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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

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

Dao dao

func New

func New() (dao *Dao)

New init mysql db

func (*Dao) AccountCards

func (d *Dao) AccountCards(ctx context.Context, mids []int64) (cards map[int64]*accmdl.Card, err error)

AccountCards get cards by mids

func (*Dao) AddCacheElecPrepAVRank

func (d *Dao) AddCacheElecPrepAVRank(c context.Context, avID, ver int64, val *model.RankElecPrepAVProto) (ok bool, err error)

AddCacheElecPrepAVRank Set data to mc

func (*Dao) AddCacheElecPrepUPRank

func (d *Dao) AddCacheElecPrepUPRank(c context.Context, upMID, ver int64, val *model.RankElecPrepUPProto) (ok bool, err error)

AddCacheElecPrepUPRank Set data to mc

func (*Dao) BeginTran

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

BeginTran begin transcation.

func (*Dao) CASCacheElecPrepRank

func (d *Dao) CASCacheElecPrepRank(c context.Context, val interface{}, rawItem *memcache.Item) (ok bool, err error)

CASCacheElecPrepRank cas的方式存储预备榜单,防止分布式脏写

func (*Dao) CacheElecAVRank

func (d *Dao) CacheElecAVRank(c context.Context, avID, ver int64) (res *model.RankElecAVProto, err error)

CacheElecAVRank get data from mc

func (*Dao) CacheElecPrepAVRank

func (d *Dao) CacheElecPrepAVRank(c context.Context, avID, ver int64) (res *model.RankElecPrepAVProto, item *memcache.Item, err error)

CacheElecPrepAVRank get data from mc

func (*Dao) CacheElecPrepUPRank

func (d *Dao) CacheElecPrepUPRank(c context.Context, upMID, ver int64) (res *model.RankElecPrepUPProto, item *memcache.Item, err error)

CacheElecPrepUPRank get data from mc

func (*Dao) CacheElecUPRank

func (d *Dao) CacheElecUPRank(c context.Context, upMID int64, ver int64) (res *model.RankElecUPProto, err error)

CacheElecUPRank get data from mc

func (*Dao) Close

func (d *Dao) Close()

Close close the resource.

func (*Dao) DelCacheElecAVRank

func (d *Dao) DelCacheElecAVRank(c context.Context, avID, ver int64) (err error)

DelCacheElecAVRank delete data from mc

func (*Dao) DelCacheElecPrepAVRank

func (d *Dao) DelCacheElecPrepAVRank(c context.Context, avID, ver int64) (err error)

DelCacheElecPrepAVRank delete data from mc

func (*Dao) DelCacheElecPrepUPRank

func (d *Dao) DelCacheElecPrepUPRank(c context.Context, upMID, ver int64) (err error)

DelCacheElecPrepUPRank delete data from mc

func (*Dao) DelCacheElecUPRank

func (d *Dao) DelCacheElecUPRank(c context.Context, upMID, ver int64) (err error)

DelCacheElecUPRank delete data from mc

func (*Dao) LCLoadElecAVRank

func (d *Dao) LCLoadElecAVRank(avID, ver int64) (rank *model.RankElecAVProto, err error)

LCLoadElecAVRank .

func (*Dao) LCLoadElecUPRank

func (d *Dao) LCLoadElecUPRank(upMID, ver int64) (rank *model.RankElecUPProto, err error)

LCLoadElecUPRank .

func (*Dao) LCStoreElecAVRank

func (d *Dao) LCStoreElecAVRank(avID, ver int64, rank *model.RankElecAVProto) (err error)

LCStoreElecAVRank .

func (*Dao) LCStoreElecUPRank

func (d *Dao) LCStoreElecUPRank(upMID, ver int64, rank *model.RankElecUPProto) (err error)

LCStoreElecUPRank .

func (*Dao) Ping

func (d *Dao) Ping(ctx context.Context) error

Ping dao ping

func (*Dao) RawCountElecAVRank

func (d *Dao) RawCountElecAVRank(ctx context.Context, avID int64, ver int64) (count int64, err error)

RawCountElecAVRank .

func (*Dao) RawCountElecUPRank

func (d *Dao) RawCountElecUPRank(ctx context.Context, upMID int64, ver int64) (count int64, err error)

RawCountElecUPRank .

func (*Dao) RawCountUPTotalElec

func (d *Dao) RawCountUPTotalElec(ctx context.Context, upMID int64) (count int64, err error)

RawCountUPTotalElec stupid bug from prod.

func (*Dao) RawElecAVMessages

func (d *Dao) RawElecAVMessages(ctx context.Context, payMIDs []int64, avID int64) (dataMap map[int64]*model.DBElecMessage, err error)

RawElecAVMessages .

func (*Dao) RawElecAVMessagesByVer

func (d *Dao) RawElecAVMessagesByVer(ctx context.Context, payMIDs []int64, avID int64, ver int64) (dataMap map[int64]*model.DBElecMessage, err error)

RawElecAVMessagesByVer .

func (*Dao) RawElecAVRank

func (d *Dao) RawElecAVRank(ctx context.Context, avID int64, ver int64, payMID int64) (data *model.DBElecAVRank, err error)

RawElecAVRank .

func (*Dao) RawElecAVRankList

func (d *Dao) RawElecAVRankList(ctx context.Context, avID int64, ver int64, limit int) (list []*model.DBElecAVRank, err error)

RawElecAVRankList .

func (*Dao) RawElecAVUserRank

func (d *Dao) RawElecAVUserRank(ctx context.Context, avID int64, ver int64, payAmount int64, mtime time.Time) (rank int, err error)

RawElecAVUserRank .

func (*Dao) RawElecUPMessages

func (d *Dao) RawElecUPMessages(ctx context.Context, payMIDs []int64, upMID int64, ver int64) (dataMap map[int64]*model.DBElecMessage, err error)

RawElecUPMessages .

func (*Dao) RawElecUPRank

func (d *Dao) RawElecUPRank(ctx context.Context, upMID int64, ver int64, payMID int64) (data *model.DBElecUPRank, err error)

RawElecUPRank get elec up rank

func (*Dao) RawElecUPRankList

func (d *Dao) RawElecUPRankList(ctx context.Context, upMID int64, ver int64, limit int) (list []*model.DBElecUPRank, err error)

RawElecUPRankList get elec up rank

func (*Dao) RawElecUPUserRank

func (d *Dao) RawElecUPUserRank(ctx context.Context, upMID int64, ver int64, payAmount int64, mtime time.Time) (rank int, err error)

RawElecUPUserRank .

func (*Dao) RawElecUserSettings

func (d *Dao) RawElecUserSettings(ctx context.Context, id int, limit int) (res map[int64]model.ElecUserSetting, maxID int, err error)

RawElecUserSettings .

func (*Dao) SetCacheElecAVRank

func (d *Dao) SetCacheElecAVRank(c context.Context, avID, ver int64, val *model.RankElecAVProto) (err error)

SetCacheElecAVRank Set data to mc

func (*Dao) SetCacheElecPrepAVRank

func (d *Dao) SetCacheElecPrepAVRank(c context.Context, avID, ver int64, val *model.RankElecPrepAVProto) (err error)

SetCacheElecPrepAVRank Set data to mc

func (*Dao) SetCacheElecPrepUPRank

func (d *Dao) SetCacheElecPrepUPRank(c context.Context, upMID, ver int64, val *model.RankElecPrepUPProto) (err error)

SetCacheElecPrepUPRank Set data to mc

func (*Dao) SetCacheElecUPRank

func (d *Dao) SetCacheElecUPRank(c context.Context, upMID, ver int64, val *model.RankElecUPProto) (err error)

SetCacheElecUPRank Set data to mc

Jump to

Keyboard shortcuts

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