dao

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PopupKey

func PopupKey(mid int64) string

PopupKey new medal popup key.

func RedPointKey

func RedPointKey(mid int64) string

RedPointKey new medal RedPoint key.

Types

type Dao

type Dao struct {
	// contains filtered or unexported fields
}

Dao struct answer history of Dao

func New

func New(c *conf.Config) (d *Dao)

New new a Dao and return.

func (*Dao) AddIgnoreInvite

func (d *Dao) AddIgnoreInvite(c context.Context, inv *model.Invite) (affected int64, err error)

AddIgnoreInvite add ignore invite code.

func (*Dao) AddMedal

func (d *Dao) AddMedal(c context.Context, m *model.Medal) (affected int64, err error)

AddMedal add medal .

func (*Dao) AddMedalOperLog

func (d *Dao) AddMedalOperLog(c context.Context, oid int64, mid int64, medalID int64, action string) (affected int64, err error)

AddMedalOperLog insert medal operation log.

func (*Dao) AddPendantEquip

func (d *Dao) AddPendantEquip(c context.Context, pkg *model.PendantPKG) (affected int64, err error)

AddPendantEquip insert pendant equip.

func (*Dao) AddPendantGroup

func (d *Dao) AddPendantGroup(c context.Context, pg *model.PendantGroup) (gid int64, err error)

AddPendantGroup insert pendant group .

func (*Dao) AddPendantOperLog

func (d *Dao) AddPendantOperLog(c context.Context, oid int64, uids []int64, pid int64, action string) (affected int64, err error)

AddPendantOperLog insert pendant operation log.

func (*Dao) AddPendantPKG

func (d *Dao) AddPendantPKG(c context.Context, pkg *model.PendantPKG) (affected int64, err error)

AddPendantPKG insert pendant pkg.

func (*Dao) BeginTran

func (d *Dao) BeginTran(c context.Context) (tx *sql.Tx, err error)

BeginTran begin tran.

func (*Dao) BuildOrderInfoSQL

func (d *Dao) BuildOrderInfoSQL(c context.Context, arg *model.ArgPendantOrder, tp string) (sql string, values []interface{})

BuildOrderInfoSQL build a order sql string.

func (*Dao) Close

func (d *Dao) Close()

Close close connections of mc, redis, db.

func (*Dao) CountOrderHistory

func (d *Dao) CountOrderHistory(c context.Context, arg *model.ArgPendantOrder) (total int64, err error)

CountOrderHistory count order history.

func (*Dao) CountOwnerBYNidMid

func (d *Dao) CountOwnerBYNidMid(c context.Context, mid, nid int64) (count int64, err error)

CountOwnerBYNidMid retun number of medal_owner by mid and nid.

func (*Dao) DelEquipsCache

func (d *Dao) DelEquipsCache(c context.Context, uids []int64) (err error)

DelEquipsCache del batch equip cache .

func (*Dao) DelMedalActivatedCache

func (d *Dao) DelMedalActivatedCache(c context.Context, mid int64) (err error)

DelMedalActivatedCache delete activated medal cache.

func (*Dao) DelMedalOwnersCache

func (d *Dao) DelMedalOwnersCache(c context.Context, mid int64) (err error)

DelMedalOwnersCache delete medal_owner cache.

func (*Dao) DelPKGCache

func (d *Dao) DelPKGCache(c context.Context, uids []int64) (err error)

DelPKGCache del package cache

func (*Dao) DelPendantPointCache

func (d *Dao) DelPendantPointCache(c context.Context, mid int64) (err error)

DelPendantPointCache delete new pendant info red point cache.

func (*Dao) DelPopupCache

func (d *Dao) DelPopupCache(c context.Context, mid int64) (err error)

DelPopupCache delete new medal info popup cache.

func (*Dao) DelRedPointCache

func (d *Dao) DelRedPointCache(c context.Context, mid int64) (err error)

DelRedPointCache delete new medal info red point cache.

func (*Dao) Manager

func (d *Dao) Manager(c context.Context, pn, ps int64) (mi []*model.MangerInfo, err error)

Manager get manager users.

func (*Dao) ManagerTotal

func (d *Dao) ManagerTotal(c context.Context) (count int64, err error)

ManagerTotal get manager user total.

func (*Dao) Managers

func (d *Dao) Managers(c context.Context) (manMap map[int64]string, err error)

Managers get manager users info.

func (*Dao) MaxOrderHistory

func (d *Dao) MaxOrderHistory(c context.Context) (max int64, err error)

MaxOrderHistory max order history.

func (*Dao) Medal

func (d *Dao) Medal(c context.Context) (ms []*model.Medal, err error)

Medal medal info .

func (*Dao) MedalActivatedCache

func (d *Dao) MedalActivatedCache(c context.Context, mid int64) (nid int64, err error)

MedalActivatedCache get user activated medal nid.

func (*Dao) MedalAddList

func (d *Dao) MedalAddList(c context.Context, mid int64) (ms []*model.MedalMemberAddList, err error)

MedalAddList .

func (*Dao) MedalByID

func (d *Dao) MedalByID(c context.Context, id int64) (m *model.Medal, err error)

MedalByID medal info by id .

func (*Dao) MedalGroup

func (d *Dao) MedalGroup(c context.Context) (res map[int64]*model.MedalGroup, err error)

MedalGroup return medal group all .

func (*Dao) MedalGroupAdd

func (d *Dao) MedalGroupAdd(c context.Context, mg *model.MedalGroup) (affected int64, err error)

MedalGroupAdd add medal group .

func (*Dao) MedalGroupByID

func (d *Dao) MedalGroupByID(c context.Context, id int64) (mg *model.MedalGroup, err error)

MedalGroupByID medal group by gid .

func (*Dao) MedalGroupInfo

func (d *Dao) MedalGroupInfo(c context.Context) (res []*model.MedalGroup, err error)

MedalGroupInfo return medal group all info include parent group name .

func (*Dao) MedalGroupParent

func (d *Dao) MedalGroupParent(c context.Context) (res []*model.MedalGroup, err error)

MedalGroupParent return medal group parent info .

func (*Dao) MedalGroupUp

func (d *Dao) MedalGroupUp(c context.Context, id int64, mg *model.MedalGroup) (affected int64, err error)

MedalGroupUp update name group .

func (*Dao) MedalOperLog

func (d *Dao) MedalOperLog(c context.Context, mid int64, pn, ps int) (opers []*model.MedalOperLog, uids []int64, err error)

MedalOperLog get medal operation log.

func (*Dao) MedalOperationLogTotal

func (d *Dao) MedalOperationLogTotal(c context.Context, mid int64) (count int64, err error)

MedalOperationLogTotal medal operation log total.

func (*Dao) MedalOwner

func (d *Dao) MedalOwner(c context.Context, mid int64) (res []*model.MedalMemberMID, err error)

MedalOwner medal owner .

func (*Dao) MedalOwnerAdd

func (d *Dao) MedalOwnerAdd(c context.Context, mid, nid int64) (affected int64, err error)

MedalOwnerAdd add medal owner .

func (*Dao) MedalOwnerDel

func (d *Dao) MedalOwnerDel(c context.Context, mid, nid int64, isDel int8) (affected int64, err error)

MedalOwnerDel update medal owner is_del=1.

func (*Dao) MedalOwnerUpActivated

func (d *Dao) MedalOwnerUpActivated(c context.Context, mid, nid int64) (affected int64, err error)

MedalOwnerUpActivated update medal owner is_activated=1.

func (*Dao) MedalOwnerUpNotActivated

func (d *Dao) MedalOwnerUpNotActivated(c context.Context, mid, nid int64) (affected int64, err error)

MedalOwnerUpNotActivated update medal owner is_activated=0.

func (*Dao) MedalOwnersCache

func (d *Dao) MedalOwnersCache(c context.Context, mid int64) (res []*model.MedalOwner, err error)

MedalOwnersCache get medal_owner cache.

func (*Dao) MutliSendSysMsg

func (d *Dao) MutliSendSysMsg(c context.Context, allUids []int64, title string, context string, ip string) (err error)

MutliSendSysMsg Mutli send sys msg.

func (*Dao) OrderHistorys

func (d *Dao) OrderHistorys(c context.Context, arg *model.ArgPendantOrder) (pos []*model.PendantOrder, pids []int64, err error)

OrderHistorys get order historys.

func (*Dao) PendantEquipUID

func (d *Dao) PendantEquipUID(c context.Context, uid int64) (pkg *model.PendantPKG, err error)

PendantEquipUID pendant equip by uid.

func (*Dao) PendantGroupAll

func (d *Dao) PendantGroupAll(c context.Context) (pgs []*model.PendantGroup, err error)

PendantGroupAll pendant all group .

func (*Dao) PendantGroupID

func (d *Dao) PendantGroupID(c context.Context, id int64) (pg *model.PendantGroup, err error)

PendantGroupID pendant group by id.

func (*Dao) PendantGroupIDs

func (d *Dao) PendantGroupIDs(c context.Context, ids []int64) (pgs []*model.PendantGroup, err error)

PendantGroupIDs pendant group in ids.

func (*Dao) PendantGroupInfoTotal

func (d *Dao) PendantGroupInfoTotal(c context.Context) (count int64, err error)

PendantGroupInfoTotal pendant group info total.

func (*Dao) PendantGroupPIDs

func (d *Dao) PendantGroupPIDs(c context.Context, gid int64, pn, ps int) (pids []int64, err error)

PendantGroupPIDs pendant group ref pagesize.

func (*Dao) PendantGroupRefRanks

func (d *Dao) PendantGroupRefRanks(c context.Context, pn, ps int) (prs []*model.PendantGroupRef, err error)

PendantGroupRefRanks pendant group ref pagesize by rank.

func (*Dao) PendantGroupRefsGidTotal

func (d *Dao) PendantGroupRefsGidTotal(c context.Context, gid int64) (count int64, err error)

PendantGroupRefsGidTotal pendant group refs total by gid.

func (*Dao) PendantGroupRefsTotal

func (d *Dao) PendantGroupRefsTotal(c context.Context) (count int64, err error)

PendantGroupRefsTotal pendant group refs total.

func (*Dao) PendantGroups

func (d *Dao) PendantGroups(c context.Context, pn, ps int) (pgs []*model.PendantGroup, err error)

PendantGroups pendant group pagesize.

func (*Dao) PendantGroupsTotal

func (d *Dao) PendantGroupsTotal(c context.Context) (count int64, err error)

PendantGroupsTotal pendant group total.

func (*Dao) PendantInfoAll

func (d *Dao) PendantInfoAll(c context.Context, pn, ps int) (pis []*model.PendantInfo, pids []int64, err error)

PendantInfoAll pendant info all.

func (*Dao) PendantInfoAllNoPage

func (d *Dao) PendantInfoAllNoPage(c context.Context) (pis []*model.PendantInfo, err error)

PendantInfoAllNoPage pendant info no page.

func (*Dao) PendantInfoID

func (d *Dao) PendantInfoID(c context.Context, id int64) (pi *model.PendantInfo, err error)

PendantInfoID pendant info.

func (*Dao) PendantInfoIDs

func (d *Dao) PendantInfoIDs(c context.Context, ids []int64) (pis []*model.PendantInfo, pim map[int64]*model.PendantInfo, err error)

PendantInfoIDs pendant info in ids.

func (*Dao) PendantOperLog

func (d *Dao) PendantOperLog(c context.Context, pn, ps int) (opers []*model.PendantOperLog, uids []int64, err error)

PendantOperLog get pendant operation log.

func (*Dao) PendantOperationLogTotal

func (d *Dao) PendantOperationLogTotal(c context.Context) (count int64, err error)

PendantOperationLogTotal pendant operation log total.

func (*Dao) PendantPKG

func (d *Dao) PendantPKG(c context.Context, uid, pid int64) (pkg *model.PendantPKG, err error)

PendantPKG get pendant in pkg.

func (*Dao) PendantPKGUIDs

func (d *Dao) PendantPKGUIDs(c context.Context, uids []int64, pid int64) (pkgs []*model.PendantPKG, err error)

PendantPKGUIDs get pendant pkgs by muilti uid.

func (*Dao) PendantPKGs

func (d *Dao) PendantPKGs(c context.Context, uid int64) (pkgs []*model.PendantPKG, err error)

PendantPKGs get pendant pkgs.

func (*Dao) PendantPointCache

func (d *Dao) PendantPointCache(c context.Context, mid int64) (pid int64, err error)

PendantPointCache get new pendant info red point cache.

func (*Dao) PendantPriceIDs

func (d *Dao) PendantPriceIDs(c context.Context, ids []int64) (ppm map[int64][]*model.PendantPrice, err error)

PendantPriceIDs pendant price in ids.

func (*Dao) Ping

func (d *Dao) Ping(c context.Context) (err error)

Ping ping health.

func (*Dao) PopupCache

func (d *Dao) PopupCache(c context.Context, mid int64) (nid int64, err error)

PopupCache get new medal info popup cache.

func (*Dao) RangeInvites

func (d *Dao) RangeInvites(c context.Context, mid int64, start, end time.Time) (res []*model.Invite, err error)

RangeInvites range invites.

func (*Dao) RedPointCache

func (d *Dao) RedPointCache(c context.Context, mid int64) (nid int64, err error)

RedPointCache get new medal info red point cache.

func (*Dao) SendSysMsg

func (d *Dao) SendSysMsg(c context.Context, uids []int64, title string, context string, ip string) (err error)

SendSysMsg send sys msg.

func (*Dao) SetMedalActivatedCache

func (d *Dao) SetMedalActivatedCache(c context.Context, mid, nid int64) (err error)

SetMedalActivatedCache set activated medal cache.

func (*Dao) SetMedalOwnersache

func (d *Dao) SetMedalOwnersache(c context.Context, mid int64, nos []*model.MedalOwner) (err error)

SetMedalOwnersache set medal_owner cache.

func (*Dao) SetPendantPointCache

func (d *Dao) SetPendantPointCache(c context.Context, mid, pid int64) (err error)

SetPendantPointCache set red point cache.

func (*Dao) SetPopupCache

func (d *Dao) SetPopupCache(c context.Context, mid, nid int64) (err error)

SetPopupCache set popup cache.

func (*Dao) SetRedPointCache

func (d *Dao) SetRedPointCache(c context.Context, mid, nid int64) (err error)

SetRedPointCache set red point cache.

func (*Dao) TxAddPendantGroupRef

func (d *Dao) TxAddPendantGroupRef(tx *xsql.Tx, pr *model.PendantGroupRef) (affected int64, err error)

TxAddPendantGroupRef tx insert pendant group ref.

func (*Dao) TxAddPendantInfo

func (d *Dao) TxAddPendantInfo(tx *xsql.Tx, pi *model.PendantInfo) (pid int64, err error)

TxAddPendantInfo insert pendant info.

func (*Dao) TxAddPendantPKGs

func (d *Dao) TxAddPendantPKGs(tx *xsql.Tx, pkgs []*model.PendantPKG) (affected int64, err error)

TxAddPendantPKGs multi insert pendant pkg.

func (*Dao) TxAddPendantPrices

func (d *Dao) TxAddPendantPrices(tx *xsql.Tx, pp *model.PendantPrice) (affected int64, err error)

TxAddPendantPrices insert pendant prices.

func (*Dao) TxUpPendantGroupRef

func (d *Dao) TxUpPendantGroupRef(tx *xsql.Tx, gid, pid int64) (affected int64, err error)

TxUpPendantGroupRef update pendant group ref.

func (*Dao) TxUpPendantInfo

func (d *Dao) TxUpPendantInfo(tx *xsql.Tx, pi *model.PendantInfo) (affected int64, err error)

TxUpPendantInfo update pendant info.

func (*Dao) TxUpPendantPKGs

func (d *Dao) TxUpPendantPKGs(tx *xsql.Tx, pkgs []*model.PendantPKG) (affected int64, err error)

TxUpPendantPKGs multi update pendant pkg.

func (*Dao) UpMedal

func (d *Dao) UpMedal(c context.Context, id int64, m *model.Medal) (affected int64, err error)

UpMedal update nameplate .

func (*Dao) UpPendantGroup

func (d *Dao) UpPendantGroup(c context.Context, pg *model.PendantGroup) (affected int64, err error)

UpPendantGroup update pendant group.

func (*Dao) UpPendantGroupStatus

func (d *Dao) UpPendantGroupStatus(c context.Context, gid int64, status int8) (affected int64, err error)

UpPendantGroupStatus update pendant group status.

func (*Dao) UpPendantInfoStatus

func (d *Dao) UpPendantInfoStatus(c context.Context, pid int64, status int8) (affected int64, err error)

UpPendantInfoStatus update pendant info status.

func (*Dao) Upload

func (d *Dao) Upload(c context.Context, fileName, fileType string, expire int64, body io.Reader) (location string, err error)

Upload upload picture or log file to bfs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL