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: 15 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 struct user of Dao.

func New

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

New create a instance of Dao and return.

func (*Dao) AccInfo

func (d *Dao) AccInfo(c context.Context, mid int64) (ai *accmdl.Info, err error)

AccInfo get account info by mid

func (*Dao) AddEvent

func (d *Dao) AddEvent(c context.Context, f *model.Event) (ret int64, err error)

AddEvent add event.

func (*Dao) AddFactor

func (d *Dao) AddFactor(c context.Context, f *model.Factor) (ret int64, err error)

AddFactor add factor.

func (*Dao) AddGroup

func (d *Dao) AddGroup(c context.Context, f *model.FactorGroup) (ret int64, err error)

AddGroup add group.

func (*Dao) AddLog

func (d *Dao) AddLog(c context.Context, l *model.Log) (affected int64, err error)

AddLog add log.

func (*Dao) AddService

func (d *Dao) AddService(c context.Context, f *model.Service) (ret int64, err error)

AddService add service.

func (*Dao) AllEvent

func (d *Dao) AllEvent(c context.Context) (list []*model.Event, err error)

AllEvent all event.

func (*Dao) ClearCount

func (d *Dao) ClearCount(c context.Context, mid int64, operator string) (err error)

ClearCount clear count.

func (*Dao) Close

func (d *Dao) Close()

Close close connection of db , mc.

func (*Dao) DeleteStat

func (d *Dao) DeleteStat(c context.Context, isdel int8, id int64) (affected int64, err error)

DeleteStat delete stat.

func (*Dao) Event

func (d *Dao) Event(ctx context.Context, eventName string) (event *model.Event, err error)

Event get event from db.

func (*Dao) Factors

func (d *Dao) Factors(c context.Context, gid int64) (res []*model.Factor, err error)

Factors get all factor info by group id.

func (*Dao) Groups

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

Groups get all group info.

func (*Dao) HistoryPage

func (d *Dao) HistoryPage(c context.Context, h *model.HisParamReq) (hs []*model.EventHistoryDto, err error)

HistoryPage user event history.

func (*Dao) HistoryPageTotalC

func (d *Dao) HistoryPageTotalC(c context.Context, h *model.HisParamReq) (totalCount int, err error)

HistoryPageTotalC user ecent history page.

func (*Dao) Info

func (d *Dao) Info(c context.Context, mid int64) (res *model.UserInfo, err error)

Info get lastest user info by mid.

func (*Dao) LogList

func (d *Dao) LogList(c context.Context, refID int64, module int8) (list []*model.Log, err error)

LogList log list.

func (*Dao) Ping

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

Ping check connection of db , mc.

func (*Dao) RefreshBase

func (d *Dao) RefreshBase(c context.Context, mid int64, operator string) (err error)

RefreshBase reset user base score.

func (*Dao) ReportCount

func (d *Dao) ReportCount(c context.Context) (totalCount int, err error)

ReportCount get repoet total count.

func (*Dao) ReportList

func (d *Dao) ReportList(c context.Context, ps, pn int) (list []*model.ReportDto, err error)

ReportList report list.

func (*Dao) ResetBase

func (d *Dao) ResetBase(c context.Context, mid int64, operator string) (err error)

ResetBase reset user base score.

func (*Dao) ResetEvent

func (d *Dao) ResetEvent(c context.Context, mid int64, operator string) (err error)

ResetEvent reset user event score.

func (*Dao) SettingList

func (d *Dao) SettingList(c context.Context) (list []*model.Setting, err error)

SettingList get all setting list

func (*Dao) StatCountByID

func (d *Dao) StatCountByID(c context.Context, id int64, t int8) (totalCount int64, err error)

StatCountByID count by id.

func (*Dao) StatCountByMid

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

StatCountByMid count by mid.

func (*Dao) StatListByID

func (d *Dao) StatListByID(c context.Context, id int64, t int8, pn, ps int) (list []*model.Statistics, err error)

StatListByID stat list by id.

func (*Dao) StatListByMid

func (d *Dao) StatListByMid(c context.Context, mid int64, pn, ps int) (list []*model.Statistics, err error)

StatListByMid stat list by mid.

func (*Dao) Statistics

func (d *Dao) Statistics(c context.Context, id int64) (stat *model.Statistics, err error)

Statistics get stat info by id from db.

func (*Dao) UpdateEventName

func (d *Dao) UpdateEventName(c context.Context, e *model.Event) (affected int64, err error)

UpdateEventName update event name.

func (*Dao) UpdateFactor

func (d *Dao) UpdateFactor(c context.Context, factorVal float32, id int64) (affected int64, err error)

UpdateFactor update factor.

func (*Dao) UpdateSetting

func (d *Dao) UpdateSetting(c context.Context, property string, val string) (affected int64, err error)

UpdateSetting update setting

func (*Dao) UpdateStatQuantity

func (d *Dao) UpdateStatQuantity(c context.Context, count int64, id int64) (affected int64, err error)

UpdateStatQuantity update stat quantity

func (*Dao) UpdateStatState

func (d *Dao) UpdateStatState(c context.Context, state int8, id int64) (affected int64, err error)

UpdateStatState update stat state.

func (*Dao) UserScore

func (d *Dao) UserScore(c context.Context, mid int64) (userScore *spymdl.UserScore, err error)

UserScore get userscore by id , will init score if score not exist.

Jump to

Keyboard shortcuts

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