newcomer

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: 20 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 define

func New

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

New init dao

func (*Dao) AllGiftRewards

func (d *Dao) AllGiftRewards(c context.Context) (res map[int8][]*newcomer.GiftReward, err error)

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) BCoin

func (d *Dao) BCoin(c context.Context, mid int64, activityID string, money int64) (err error)

BCoin receive b coin.

func (*Dao) BaseRewardCount

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

BaseRewardCount get received base reward count

func (*Dao) BigMemberCoupon

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

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) Close

func (d *Dao) Close() (err error)

Close db

func (*Dao) GiftRewardCount

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

GiftRewardCount get received gift reward count

func (*Dao) GiftRewards

func (d *Dao) GiftRewards(c context.Context, taskType int8) (res []int64, err error)

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) Lock

func (d *Dao) Lock(ctx context.Context, key string, ttl int) (gotLock bool, err error)

Lock .

func (*Dao) Mall

func (d *Dao) Mall(c context.Context, mid int64, couponID, uname string) (err error)

Mall receive mall coupon code.

func (*Dao) Pendant

func (d *Dao) Pendant(c context.Context, mid int64, priceID string, expires int64) (err error)

Pendant receive pendant.

func (*Dao) Ping

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

Ping db

func (*Dao) RewardActivate

func (d *Dao) RewardActivate(c context.Context, mid, id int64) (int64, error)

RewardActivate activate reward.

func (*Dao) RewardActivate2

func (d *Dao) RewardActivate2(c context.Context, mid, oid, nid int64) (int64, error)

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

func (d *Dao) RewardReceive(c context.Context, places string, args []interface{}) (int64, error)

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

func (d *Dao) RewardReceivedGroup(c context.Context, mid int64, ids []int64) (res []int, err error)

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) Rewards

func (d *Dao) Rewards(c context.Context) (res []*newcomer.Reward, err error)

Rewards get all reward receive.

func (*Dao) SendNotify

func (d *Dao) SendNotify(c context.Context, mids []int64, mc, title, context string) (err error)

SendNotify send msg notify user

func (*Dao) TaskGroupRewards

func (d *Dao) TaskGroupRewards(c context.Context, groupID int64) (res []int64, err error)

TaskGroupRewards get the rewards of gift by group_id

func (*Dao) TaskGroups

func (d *Dao) TaskGroups(c context.Context) (res []*newcomer.TaskGroupEntity, err error)

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) Tasks

func (d *Dao) Tasks(c context.Context) (res []*newcomer.Task, err error)

Tasks get all task.

func (*Dao) UnLock

func (d *Dao) UnLock(ctx context.Context, key string) (err error)

UnLock .

func (*Dao) UpUserTask

func (d *Dao) UpUserTask(c context.Context, mid, tid int64) (int64, error)

UpUserTask update user task finish state

func (*Dao) UserTaskBind

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

UserTaskBind determine if the user has bound the task

func (*Dao) UserTaskType

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

UserTaskType Determining the type of task that users have

func (*Dao) UserTasks

func (d *Dao) UserTasks(c context.Context, mid int64) (res []*newcomer.Task, err error)

UserTasks get user tasks

func (*Dao) UserTasksByMID

func (d *Dao) UserTasksByMID(c context.Context, mid int64) (res []*newcomer.UserTask, err error)

UserTasksByMID get user unfinish task by mid.

Jump to

Keyboard shortcuts

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