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

This section is empty.

Types

type Dao

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

Dao struct info of Dao.

func New

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

New new a Dao and return.

func (*Dao) AddBcoinSalary

func (d *Dao) AddBcoinSalary(c context.Context, arg *model.VipBcoinSalaryMsg) (err error)

AddBcoinSalary add bcoin salary

func (*Dao) AddChangeHistoryBatch

func (d *Dao) AddChangeHistoryBatch(res []*model.VipChangeHistory) (err error)

AddChangeHistoryBatch batch add change history

func (*Dao) AddLogginIP

func (d *Dao) AddLogginIP(c context.Context, mid int64, ip uint32) (err error)

AddLogginIP save user loggin info to sortset

func (*Dao) AddPayOrder

func (d *Dao) AddPayOrder(c context.Context, r *model.VipPayOrder) (a int64, err error)

AddPayOrder add payorder

func (*Dao) AddPayOrderLog

func (d *Dao) AddPayOrderLog(c context.Context, r *model.VipPayOrderLog) (a int64, err error)

AddPayOrderLog add payorderlog

func (*Dao) AddSalaryLog

func (d *Dao) AddSalaryLog(c context.Context, l *model.VideoCouponSalaryLog, dv string) (err error)

AddSalaryLog add salary log.

func (*Dao) AddTransferLock

func (d *Dao) AddTransferLock(c context.Context, key string) (succeed bool)

AddTransferLock add lock.

func (*Dao) AddUserInfo

func (d *Dao) AddUserInfo(tx *sql.Tx, r *model.VipUserInfo) (eff int64, err error)

AddUserInfo add user info.

func (*Dao) AutoRenewPay

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

AutoRenewPay auto renew pay.

func (*Dao) BatchAddBcoinSalary

func (d *Dao) BatchAddBcoinSalary(bcoins []*model.VipBcoinSalary) (err error)

BatchAddBcoinSalary batch add bcoin salary data

func (*Dao) BatchAddPayOrder

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

BatchAddPayOrder batch add pay order

func (*Dao) Close

func (d *Dao) Close()

Close close connections of mc, redis, db.

func (*Dao) DelBcoinSalary

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

DelBcoinSalary del bcoin salary

func (*Dao) DelCache

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

DelCache del cache.

func (*Dao) DelInfoCache

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

DelInfoCache del vip info cache.

func (*Dao) DelVipFrozen

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

DelVipFrozen .

func (*Dao) DelVipInfoCache

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

DelVipInfoCache del vip info cache.

func (*Dao) Dequeue

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

Dequeue get a frozen user from redis sortset queue

func (*Dao) DupUserDiscountHistory

func (d *Dao) DupUserDiscountHistory(tx *sql.Tx, r *model.VipUserDiscountHistory) (a int64, err error)

DupUserDiscountHistory add user discount history.

func (*Dao) Enqueue

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

Enqueue put frozen user to redis sortset queue

func (*Dao) GetAbleCode

func (d *Dao) GetAbleCode(tx *sql.Tx, batchCodeID int64) (code string, err error)

GetAbleCode get able code

func (*Dao) GetVipBuyCache

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

GetVipBuyCache get vipbuy cache by key

func (*Dao) GetVipMadelCache

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

GetVipMadelCache get madel info by mid

func (*Dao) LoginCount

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

LoginCount get user recent loggin count

func (*Dao) NotGrantActOrders

func (d *Dao) NotGrantActOrders(c context.Context, panelType string, limit int) (res []*model.VipOrderActivityRecord, err error)

NotGrantActOrders not grant activity order.

func (*Dao) OldFrozenChange

func (d *Dao) OldFrozenChange(mid, status int64) (err error)

OldFrozenChange .

func (*Dao) OldVipInfo

func (d *Dao) OldVipInfo(c context.Context, mid int64) (r *model.VipUserInfoOld, err error)

OldVipInfo get old user by mid.

func (*Dao) PayOrder

func (d *Dao) PayOrder(c context.Context, paramsMap map[string]interface{}) (err error)

PayOrder pay order.

func (*Dao) PaySign

func (d *Dao) PaySign(params map[string]string, token string) (sign string)

PaySign pay sign

func (*Dao) Ping

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

Ping ping health of db.

func (*Dao) PushData

func (d *Dao) PushData(c context.Context, mids []int64, pushData *model.VipPushData, curtime string) (rel *model.VipPushResq, err error)

PushData http push data

func (*Dao) PushDatas

func (d *Dao) PushDatas(c context.Context, curtime string) (res []*model.VipPushData, err error)

PushDatas get push datas

func (*Dao) RemQueue

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

RemQueue del a frozen user from redis sortset queue

func (*Dao) SalaryCoupon

func (d *Dao) SalaryCoupon(c context.Context, mid int64, couponType int8, count int64, token string) (err error)

SalaryCoupon salary coupon.

func (*Dao) SalaryLogMaxID

func (d *Dao) SalaryLogMaxID(c context.Context, dv string) (maxID int, err error)

SalaryLogMaxID select salary log max id.

func (*Dao) SalaryVideoCouponList

func (d *Dao) SalaryVideoCouponList(c context.Context, mid int64, dv string) (res []*model.VideoCouponSalaryLog, err error)

SalaryVideoCouponList select salary video coupon list.

func (*Dao) SelAppInfo

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

SelAppInfo sel vip_app_info data

func (*Dao) SelBatchCodeByID

func (d *Dao) SelBatchCodeByID(tx *sql.Tx, batchCodeID int64) (r *model.VipResourceBatchCode, err error)

SelBatchCodeByID .

func (*Dao) SelBcoinMaxID

func (d *Dao) SelBcoinMaxID(c context.Context) (maxID int64, err error)

SelBcoinMaxID sel bcoin maxID

func (*Dao) SelBcoinSalary

func (d *Dao) SelBcoinSalary(c context.Context, arg *model.QueryBcoinSalary) (res []*model.VipBcoinSalary, err error)

SelBcoinSalary sel bcoin salary data by query

func (*Dao) SelBcoinSalaryData

func (d *Dao) SelBcoinSalaryData(c context.Context, startID int64, endID int64) (res []*model.VipBcoinSalary, err error)

SelBcoinSalaryData sel bcoinSalary data

func (*Dao) SelBcoinSalaryDataMaps

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

SelBcoinSalaryDataMaps sel bcoin salary data convert map

func (*Dao) SelChangeHistory

func (d *Dao) SelChangeHistory(c context.Context, startID, endID int64) (res []*model.VipChangeHistory, err error)

SelChangeHistory .

func (*Dao) SelChangeHistoryMaps

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

SelChangeHistoryMaps .

func (*Dao) SelChangeHistoryMaxID

func (d *Dao) SelChangeHistoryMaxID(c context.Context) (id int64, err error)

SelChangeHistoryMaxID .

func (*Dao) SelEffectiveScopeVipList

func (d *Dao) SelEffectiveScopeVipList(c context.Context, id, endID int) (res []*model.VipInfoDB, err error)

SelEffectiveScopeVipList get vip list by id scope.

func (*Dao) SelEffectiveVipList

func (d *Dao) SelEffectiveVipList(c context.Context, id, endID int) (res []*model.VipUserInfo, err error)

SelEffectiveVipList sel effective vip data

func (*Dao) SelMaxID

func (d *Dao) SelMaxID(c context.Context) (mID int, err error)

SelMaxID get max id

func (*Dao) SelOldBcoinMaxID

func (d *Dao) SelOldBcoinMaxID(c context.Context) (maxID int64, err error)

SelOldBcoinMaxID sel oldbcoin maxID

func (*Dao) SelOldBcoinSalary

func (d *Dao) SelOldBcoinSalary(c context.Context, startID, endID int64) (res []*model.VipBcoinSalary, err error)

SelOldBcoinSalary sel old bcoin salary

func (*Dao) SelOldBcoinSalaryDataMaps

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

SelOldBcoinSalaryDataMaps sel old bcoin salary data convert map

func (*Dao) SelOldChangeHistory

func (d *Dao) SelOldChangeHistory(c context.Context, startID, endID int64) (res []*model.VipChangeHistory, err error)

SelOldChangeHistory .

func (*Dao) SelOldChangeHistoryMaps

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

SelOldChangeHistoryMaps .

func (*Dao) SelOldChangeHistoryMaxID

func (d *Dao) SelOldChangeHistoryMaxID(c context.Context) (id int64, err error)

SelOldChangeHistoryMaxID .

func (*Dao) SelOldOrderMaxID

func (d *Dao) SelOldOrderMaxID(c context.Context) (maxID int, err error)

SelOldOrderMaxID sel old order maxID

func (*Dao) SelOldPayOrder

func (d *Dao) SelOldPayOrder(c context.Context, sID, eID int) (res []*model.VipPayOrderOld, err error)

SelOldPayOrder sel old payorder

func (*Dao) SelOldRechargeOrder

func (d *Dao) SelOldRechargeOrder(c context.Context, orderNos []string) (res []*model.VipRechargeOrder, err error)

SelOldRechargeOrder sel old rechargeOrder

func (*Dao) SelOldSalaryList

func (d *Dao) SelOldSalaryList(c context.Context, id, endID int, dv string) (res []*model.OldSalaryLog, err error)

SelOldSalaryList sel old salary list

func (*Dao) SelOldUserInfoMaps

func (d *Dao) SelOldUserInfoMaps(c context.Context, sID, eID int) (res map[int64]*model.VipUserInfoOld, err error)

SelOldUserInfoMaps sel old user info map.

func (*Dao) SelOldUserInfoMaxID

func (d *Dao) SelOldUserInfoMaxID(c context.Context) (maxID int, err error)

SelOldUserInfoMaxID sel old userinfo maxID

func (*Dao) SelOrderByOrderNo

func (d *Dao) SelOrderByOrderNo(c context.Context, orderNo string) (r *model.VipPayOrder, err error)

SelOrderByOrderNo sel payorder by orderNo

func (*Dao) SelOrderMaxID

func (d *Dao) SelOrderMaxID(c context.Context) (maxID int, err error)

SelOrderMaxID sel order maxID

func (*Dao) SelPayOrder

func (d *Dao) SelPayOrder(c context.Context, sID, eID int) (res []*model.VipPayOrder, err error)

SelPayOrder sel payorder

func (*Dao) SelPayOrderByMid

func (d *Dao) SelPayOrderByMid(c context.Context, mid int64, orderType, status int8) (r *model.VipPayOrder, err error)

SelPayOrderByMid sel payorder by mid

func (*Dao) SelPayOrderLog

func (d *Dao) SelPayOrderLog(c context.Context, mid int64, status int8) (r *model.VipPayOrderLog, err error)

SelPayOrderLog sel pay order log.

func (*Dao) SelUserDiscountHistorys

func (d *Dao) SelUserDiscountHistorys(c context.Context, sID, eID, discountID int) (res []*model.VipUserDiscountHistory, err error)

SelUserDiscountHistorys sel user discount hsitorys

func (*Dao) SelUserDiscountMaxID

func (d *Dao) SelUserDiscountMaxID(c context.Context) (maxID int, err error)

SelUserDiscountMaxID sel discount maxID

func (*Dao) SelUserInfoMaxID

func (d *Dao) SelUserInfoMaxID(c context.Context) (maxID int, err error)

SelUserInfoMaxID select userinfo maxID.

func (*Dao) SelUserInfos

func (d *Dao) SelUserInfos(c context.Context, sID, eID int) (res []*model.VipUserInfo, err error)

SelUserInfos sel user infos

func (*Dao) SelVipByIds

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

SelVipByIds select vip by ids .

func (*Dao) SelVipList

func (d *Dao) SelVipList(c context.Context, id, endID int, ot string) (res []*model.VipUserInfo, err error)

SelVipList sel vipuserinfo list

func (*Dao) SelVipUserInfo

func (d *Dao) SelVipUserInfo(c context.Context, mid int64) (r *model.VipUserInfo, err error)

SelVipUserInfo sel vipuser info

func (*Dao) SelVipUserInfos

func (d *Dao) SelVipUserInfos(c context.Context, id, endID int, startTime, endTime time.Time, status int) (res []int64, err error)

SelVipUserInfos sel vipuser info datas

func (*Dao) SelVipUsers

func (d *Dao) SelVipUsers(c context.Context, id, endID int, startTime, endTime time.Time) (res []*model.VipUserInfo, err error)

SelVipUsers .

func (*Dao) SendAppCleanCache

func (d *Dao) SendAppCleanCache(c context.Context, hv *model.HandlerVip, app *model.VipAppInfo) (err error)

SendAppCleanCache notice app clean cache

func (*Dao) SendBcoin

func (d *Dao) SendBcoin(c context.Context, mids []int64, money int32, dueTime time.Time, ip string) (err error)

SendBcoin send bcoin http

func (*Dao) SendCleanCache

func (d *Dao) SendCleanCache(c context.Context, hv *model.HandlerVip) (err error)

SendCleanCache clean cache

func (*Dao) SendMedal

func (d *Dao) SendMedal(c context.Context, mid, medalID int64) (status int64)

SendMedal send medal

func (*Dao) SendMultipMsg

func (d *Dao) SendMultipMsg(c context.Context, mids, content, title, mc string, dataType int) (err error)

SendMultipMsg send multip msg

func (*Dao) SendVipBuyTicket

func (d *Dao) SendVipBuyTicket(c context.Context, mid int64, couponID string) (status int64)

SendVipBuyTicket send vipbuy ticket

func (*Dao) SetVipBuyCache

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

SetVipBuyCache set vipbuy cache

func (*Dao) SetVipFrozen

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

SetVipFrozen .

func (*Dao) SetVipInfoCache

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

SetVipInfoCache set vip info cache.

func (*Dao) SetVipMadelCache

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

SetVipMadelCache set vip madel cache

func (*Dao) StartTx

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

StartTx start tx

func (*Dao) SyncAddUser

func (d *Dao) SyncAddUser(c context.Context, r *model.VipUserInfo) (err error)

SyncAddUser insert vipUserInfo

func (*Dao) SyncUpdateUser

func (d *Dao) SyncUpdateUser(c context.Context, r *model.VipUserInfo, ver int64) (eff int64, err error)

SyncUpdateUser insert vipUserInfo

func (*Dao) UpdateBcoinSalary

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

UpdateBcoinSalary update bcoin salary

func (*Dao) UpdateBcoinSalaryBatch

func (d *Dao) UpdateBcoinSalaryBatch(c context.Context, ids []int64, status int8) (err error)

UpdateBcoinSalaryBatch update bcoin salary batch

func (*Dao) UpdateCodeRelationID

func (d *Dao) UpdateCodeRelationID(tx *sql.Tx, code, relationID string, bmid int64) (err error)

UpdateCodeRelationID update code relationID

func (*Dao) UpdatePayOrderStatus

func (d *Dao) UpdatePayOrderStatus(c context.Context, r *model.VipPayOrder) (a int64, err error)

UpdatePayOrderStatus update payorder status

func (*Dao) UpdatePushData

func (d *Dao) UpdatePushData(c context.Context, status, progressStatus int8, pushedCount int32, errcode, data, id int64) (err error)

UpdatePushData update push data

func (*Dao) UpdateRechargeOrder

func (d *Dao) UpdateRechargeOrder(c context.Context, r *model.VipPayOrder) (a int64, err error)

UpdateRechargeOrder update recharge order info

func (*Dao) UpdateUserInfo

func (d *Dao) UpdateUserInfo(tx *sql.Tx, r *model.VipUserInfo) (eff int64, err error)

UpdateUserInfo add user info

func (*Dao) UpdateVipStatus

func (d *Dao) UpdateVipStatus(c context.Context, mid int64, status int) (eff int64, err error)

UpdateVipStatus update vip status info by mid

func (*Dao) UpdateVipUser

func (d *Dao) UpdateVipUser(c context.Context, mid int64, status, vipType int8, payType int8) (eff int64, err error)

UpdateVipUser update vip user info

func (*Dao) UpdateVipUserInfo

func (d *Dao) UpdateVipUserInfo(tx *sql.Tx, r *model.VipUserInfo) (a int64, err error)

UpdateVipUserInfo update vip user info by id

func (*Dao) VipStatus

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

VipStatus get user vip status.

Jump to

Keyboard shortcuts

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