重置玩家活跃度
This commit is contained in:
parent
2b4e932c6e
commit
9e3ade03ed
@ -63,8 +63,22 @@ func (this *ModuleTask) CleanTask(session comm.IUserSession) {
|
||||
this.modelTaskActive.BatchDelLists(session.GetUserId())
|
||||
}
|
||||
|
||||
// 重置玩家活跃度
|
||||
func (this *ModuleTask) resetActive(uid string, taskTag comm.TaskTag) {
|
||||
update := make(map[string]interface{})
|
||||
if taskTag == comm.TASK_DAILY {
|
||||
update["activeday"] = 0
|
||||
} else if taskTag == comm.TASK_WEEKLY {
|
||||
update["activeweek"] = 0
|
||||
}
|
||||
if len(update) > 0 {
|
||||
this.ModuleUser.ChanageUserExpand(uid, update)
|
||||
}
|
||||
}
|
||||
|
||||
//重置任务
|
||||
func (this *ModuleTask) ResetTask(uid string, taskTag comm.TaskTag) {
|
||||
this.resetActive(uid, taskTag)
|
||||
this.modelTask.clearTask(uid, taskTag)
|
||||
this.modelTaskActive.clearTask(uid, taskTag)
|
||||
this.InitTaskAll(uid)
|
||||
|
Loading…
Reference in New Issue
Block a user