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: 32 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 {
	AESBlock cipher.Block
	// contains filtered or unexported fields
}

Dao dao

func New

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

New init mysql db

func (*Dao) BatchGetLastSuccess

func (dao *Dao) BatchGetLastSuccess(c context.Context, mids []int64) (lastSuccessMap map[int64]*model.LastSuccessData, err error)

BatchGetLastSuccess batch get last find success info

func (*Dao) BatchGetRecoveryAddit

func (dao *Dao) BatchGetRecoveryAddit(c context.Context, rids []int64) (addits map[int64]*model.DBAccountRecoveryAddit, err error)

BatchGetRecoveryAddit is

func (*Dao) BatchGetRecoverySuccess

func (dao *Dao) BatchGetRecoverySuccess(c context.Context, mids []int64) (successMap map[int64]*model.RecoverySuccess, err error)

BatchGetRecoverySuccess batch get recovery success info

func (*Dao) BatchUpdateSuccessCount

func (dao *Dao) BatchUpdateSuccessCount(c context.Context, mids string) (err error)

BatchUpdateSuccessCount batch insert or update success count

func (*Dao) BeginTran

func (dao *Dao) BeginTran(ctx context.Context) (tx *sql.Tx, err error)

BeginTran begin transaction

func (*Dao) CheckCard

func (d *Dao) CheckCard(c context.Context, mid int64, cardType int8, cardCode string) (ok bool, err error)

CheckCard check card

func (*Dao) CheckPwds

func (d *Dao) CheckPwds(c context.Context, mid int64, pwds string) (v string, err error)

CheckPwds check pwd

func (*Dao) CheckRealnameStatus

func (d *Dao) CheckRealnameStatus(c context.Context, mid int64) (status int8, err error)

CheckRealnameStatus realname status

func (*Dao) CheckReg

func (d *Dao) CheckReg(c context.Context, mid int64, regTime int64, regType int8, regAddr string) (v *model.Check, err error)

CheckReg check reg info

func (*Dao) CheckSafe

func (d *Dao) CheckSafe(c context.Context, mid int64, question int8, answer string) (check *model.Check, err error)

CheckSafe safe info

func (*Dao) Close

func (d *Dao) Close()

Close close the resource.

func (*Dao) DelEMailCode

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

DelEMailCode del captcha from redis 提交:校验验证之后就删除验证码(保证只能提交一次)

func (*Dao) GetAddrByIP

func (d *Dao) GetAddrByIP(c context.Context, mid int64, limit int64) (addrs string, err error)

GetAddrByIP get addr by ip

func (*Dao) GetAllByCon

GetAllByCon get a pageData by more condition

func (*Dao) GetEMailCode

func (d *Dao) GetEMailCode(c context.Context, mid int64, linkMail string) (code string, err error)

GetEMailCode get captcha from redis

func (*Dao) GetLastSuccess

func (dao *Dao) GetLastSuccess(c context.Context, mid int64) (lastSuc *model.LastSuccessData, err error)

GetLastSuccess get last find success info

func (*Dao) GetLoginIPs

func (d *Dao) GetLoginIPs(c context.Context, mid int64, limit int64) (ipInfo []*model.LoginIPInfo, err error)

GetLoginIPs get login ip

func (*Dao) GetMailStatus

func (dao *Dao) GetMailStatus(c context.Context, rid int64) (mailStatus int64, err error)

GetMailStatus get mail_status by rid

func (*Dao) GetMidInfo

func (d *Dao) GetMidInfo(c context.Context, qType string, qKey string) (v *model.MIDInfo, err error)

GetMidInfo get mid info by more condition

func (*Dao) GetNoDeal

func (dao *Dao) GetNoDeal(c context.Context, mid int64) (count int64, err error)

GetNoDeal get no deal record

func (*Dao) GetRecoveryAddit

func (dao *Dao) GetRecoveryAddit(c context.Context, rid int64) (addit *model.DBAccountRecoveryAddit, err error)

GetRecoveryAddit is

func (*Dao) GetStatusByRid

func (dao *Dao) GetStatusByRid(c context.Context, rid int64) (status int64, err error)

GetStatusByRid get status by rid

func (*Dao) GetSuccessCount

func (dao *Dao) GetSuccessCount(c context.Context, mid int64) (count int64, err error)

GetSuccessCount get success count

func (*Dao) GetToken

func (d *Dao) GetToken(c context.Context, bid string) (res *model.TokenResq, err error)

GetToken get open token.

func (*Dao) GetUinfoByRid

func (dao *Dao) GetUinfoByRid(c context.Context, rid int64) (mid int64, linkMail string, ctime string, err error)

GetUinfoByRid get mid,linkMail by rid

func (*Dao) GetUinfoByRidMore

func (dao *Dao) GetUinfoByRidMore(c context.Context, ridsStr string) (bathRes []*model.BatchAppeal, err error)

GetUinfoByRidMore get list of BatchAppeal by rid

func (*Dao) GetUnCheckInfo

func (dao *Dao) GetUnCheckInfo(c context.Context, rid int64) (r *model.UserInfoReq, err error)

GetUnCheckInfo get uncheck info

func (*Dao) GetUserInfo

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

GetUserInfo get user info by mid

func (*Dao) GetUserType

func (d *Dao) GetUserType(c context.Context, mid int64) (gams []*model.Game, err error)

GetUserType get user_type

func (*Dao) Info3

func (d *Dao) Info3(c context.Context, mid int64) (info *account.Info, err error)

Info3 get info by mid

func (*Dao) Infos

func (d *Dao) Infos(c context.Context, ipList []string) (res map[string]*location.Info, err error)

Infos get the ips info.

func (*Dao) InsertRecoveryAddit

func (dao *Dao) InsertRecoveryAddit(c context.Context, rid int64, files, extra string) (err error)

InsertRecoveryAddit is

func (*Dao) InsertRecoveryInfo

func (dao *Dao) InsertRecoveryInfo(c context.Context, uinfo *model.UserInfoReq) (lastID int64, err error)

InsertRecoveryInfo insert data

func (*Dao) NickNameLog

func (d *Dao) NickNameLog(c context.Context, nickNameReq *model.NickNameReq) (res *model.NickNameLogRes, err error)

NickNameLog NickNameLog

func (*Dao) Ping

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

Ping dao ping

func (*Dao) PingRedis

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

PingRedis check connection success.

func (*Dao) QueryByID

func (dao *Dao) QueryByID(c context.Context, rid int64, fromTime, endTime xtime.Time) (res *model.AccountRecoveryInfo, err error)

QueryByID query by rid

func (*Dao) QueryInfoByLimit

func (dao *Dao) QueryInfoByLimit(c context.Context, req *model.DBRecoveryInfoParams) (res []*model.AccountRecoveryInfo, total int64, err error)

QueryInfoByLimit page query through limit m,n

func (*Dao) SendMail

func (d *Dao) SendMail(body string, subject string, send ...string) (err error)

SendMail send the email.

func (*Dao) SetCaptcha

func (d *Dao) SetCaptcha(c context.Context, code string, mid int64, linkMail string) (err error)

SetCaptcha set linkMail expire time.

func (*Dao) SetLinkMailCount

func (d *Dao) SetLinkMailCount(c context.Context, linkMail string) (state int64, err error)

SetLinkMailCount set linkMail expire time.

func (*Dao) UpdateBatchPwd

func (d *Dao) UpdateBatchPwd(c context.Context, mids string, operator string) (userMap map[string]*model.User, err error)

UpdateBatchPwd batch update password

func (*Dao) UpdateMailStatus

func (dao *Dao) UpdateMailStatus(c context.Context, rid int64) (err error)

UpdateMailStatus update mail_status.

func (*Dao) UpdatePwd

func (d *Dao) UpdatePwd(c context.Context, mid int64, operator string) (user *model.User, err error)

UpdatePwd update password

func (*Dao) UpdateRecoveryAddit

func (dao *Dao) UpdateRecoveryAddit(c context.Context, rid int64, files []string, extra string) (err error)

UpdateRecoveryAddit is

func (*Dao) UpdateStatus

func (dao *Dao) UpdateStatus(c context.Context, status int64, rid int64, operator string, optTime xtime.Time, remark string) (err error)

UpdateStatus update field status.

func (*Dao) UpdateSuccessCount

func (dao *Dao) UpdateSuccessCount(c context.Context, mid int64) (err error)

UpdateSuccessCount insert or update success count

func (*Dao) UpdateSysInfo

func (dao *Dao) UpdateSysInfo(c context.Context, sys *model.SysInfo, userType int64, rid int64) (err error)

UpdateSysInfo update sysinfo and user_type

func (*Dao) UpdateUserType

func (dao *Dao) UpdateUserType(c context.Context, status int64, rid int64) (err error)

UpdateUserType update field user_type.

func (*Dao) UserBindLog

func (d *Dao) UserBindLog(c context.Context, userActLogReq *model.UserBindLogReq) (res *model.UserBindLogRes, err error)

UserBindLog User bind log

func (*Dao) Verify

func (d *Dao) Verify(c context.Context, code, token string) (ok bool, err error)

Verify verify code.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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