Documentation ¶
Index ¶
- type Dao
- func (d *Dao) AllGiftRewards(c context.Context) (res map[int8][]*newcomer.GiftReward, err error)
- func (d *Dao) AllTaskGroupRewards(c context.Context) (res map[int64][]*newcomer.TaskGroupReward, err error)
- func (d *Dao) BCoin(c context.Context, mid int64, activityID string, money int64) (err error)
- func (d *Dao) BaseRewardCount(c context.Context, mid int64, ids []int64) (res int64, err error)
- func (d *Dao) BigMemberCoupon(c context.Context, mid int64, batchToken string) (err error)
- func (d *Dao) BindTasks(c context.Context, mid int64, places string, args []interface{}) (res int64, err error)
- func (d *Dao) Close() (err error)
- func (d *Dao) GiftRewardCount(c context.Context, mid int64, ids []int64) (res int64, err error)
- func (d *Dao) GiftRewards(c context.Context, taskType int8) (res []int64, err error)
- func (d *Dao) IsRewardReceived(c context.Context, mid int64, rid int64, rewardType int8) (res bool, err error)
- func (d *Dao) Lock(ctx context.Context, key string, ttl int) (gotLock bool, err error)
- func (d *Dao) Mall(c context.Context, mid int64, couponID, uname string) (err error)
- func (d *Dao) Pendant(c context.Context, mid int64, priceID string, expires int64) (err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) RewardActivate(c context.Context, mid, id int64) (int64, error)
- func (d *Dao) RewardActivate2(c context.Context, mid, oid, nid int64) (int64, error)
- func (d *Dao) RewardCompleteState(c context.Context, mid int64, tids []int64) (res int64, err error)
- func (d *Dao) RewardReceive(c context.Context, places string, args []interface{}) (int64, error)
- func (d *Dao) RewardReceive2(c context.Context, mid int64, rrs []*newcomer.RewardReceive2) (res int64, err error)
- func (d *Dao) RewardReceiveByID(c context.Context, mid, receiveID int64) (res *newcomer.RewardReceive, err error)
- func (d *Dao) RewardReceiveByOldInfo(c context.Context, r *newcomer.RewardReceive) (res *newcomer.RewardReceive2, err error)
- func (d *Dao) RewardReceivedGroup(c context.Context, mid int64, ids []int64) (res []int, err error)
- func (d *Dao) RewardReceives(c context.Context, mid int64) (res map[int8][]*newcomer.RewardReceive, err error)
- func (d *Dao) Rewards(c context.Context) (res []*newcomer.Reward, err error)
- func (d *Dao) SendNotify(c context.Context, mids []int64, mc, title, context string) (err error)
- func (d *Dao) TaskGroupRewards(c context.Context, groupID int64) (res []int64, err error)
- func (d *Dao) TaskGroups(c context.Context) (res []*newcomer.TaskGroupEntity, err error)
- func (d *Dao) TaskRewards(c context.Context) (res map[int64][]*newcomer.TaskRewardEntity, err error)
- func (d *Dao) Tasks(c context.Context) (res []*newcomer.Task, err error)
- func (d *Dao) UnLock(ctx context.Context, key string) (err error)
- func (d *Dao) UpUserTask(c context.Context, mid, tid int64) (int64, error)
- func (d *Dao) UserTaskBind(c context.Context, mid int64) (res int64, err error)
- func (d *Dao) UserTaskType(c context.Context, mid int64) (res int8, err error)
- func (d *Dao) UserTasks(c context.Context, mid int64) (res []*newcomer.Task, err error)
- func (d *Dao) UserTasksByMID(c context.Context, mid int64) (res []*newcomer.UserTask, err error)
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 define
func (*Dao) AllGiftRewards ¶
AllGiftRewards get all GiftRewards for cache
func (*Dao) AllTaskGroupRewards ¶
func (d *Dao) AllTaskGroupRewards(c context.Context) (res map[int64][]*newcomer.TaskGroupReward, err error)
AllTaskGroupRewards get all TaskGroupRewards for cache
func (*Dao) BaseRewardCount ¶
BaseRewardCount get received base reward count
func (*Dao) BigMemberCoupon ¶
BigMemberCoupon receive Coupon
func (*Dao) BindTasks ¶
func (d *Dao) BindTasks(c context.Context, mid int64, places string, args []interface{}) (res int64, err error)
BindTasks user bind tasks
func (*Dao) GiftRewardCount ¶
GiftRewardCount get received gift reward count
func (*Dao) GiftRewards ¶
GiftRewards get the rewards of gift by task_type
func (*Dao) IsRewardReceived ¶
func (d *Dao) IsRewardReceived(c context.Context, mid int64, rid int64, rewardType int8) (res bool, err error)
IsRewardReceived if the basic reward and the gift award have been received
func (*Dao) RewardActivate ¶
RewardActivate activate reward.
func (*Dao) RewardActivate2 ¶
RewardActivate2 activate reward double write
func (*Dao) RewardCompleteState ¶
func (d *Dao) RewardCompleteState(c context.Context, mid int64, tids []int64) (res int64, err error)
RewardCompleteState judge the completion of the task
func (*Dao) RewardReceive ¶
RewardReceive add reward receive records.
func (*Dao) RewardReceive2 ¶
func (d *Dao) RewardReceive2(c context.Context, mid int64, rrs []*newcomer.RewardReceive2) (res int64, err error)
RewardReceive2 add reward receive records.
func (*Dao) RewardReceiveByID ¶
func (d *Dao) RewardReceiveByID(c context.Context, mid, receiveID int64) (res *newcomer.RewardReceive, err error)
RewardReceiveByID get rewardReceive by receiveID
func (*Dao) RewardReceiveByOldInfo ¶
func (d *Dao) RewardReceiveByOldInfo(c context.Context, r *newcomer.RewardReceive) (res *newcomer.RewardReceive2, err error)
RewardReceiveByOldInfo get rewardReceive2 by old info
func (*Dao) RewardReceivedGroup ¶
RewardReceivedGroup get []task_group_id by []group_id
func (*Dao) RewardReceives ¶
func (d *Dao) RewardReceives(c context.Context, mid int64) (res map[int8][]*newcomer.RewardReceive, err error)
RewardReceives get reward receive by mid.
func (*Dao) SendNotify ¶
SendNotify send msg notify user
func (*Dao) TaskGroupRewards ¶
TaskGroupRewards get the rewards of gift by group_id
func (*Dao) TaskGroups ¶
TaskGroups get task-group
func (*Dao) TaskRewards ¶
func (d *Dao) TaskRewards(c context.Context) (res map[int64][]*newcomer.TaskRewardEntity, err error)
TaskRewards get task-rewards
func (*Dao) UpUserTask ¶
UpUserTask update user task finish state
func (*Dao) UserTaskBind ¶
UserTaskBind determine if the user has bound the task
func (*Dao) UserTaskType ¶
UserTaskType Determining the type of task that users have