This commit is contained in:
yangduo 2024-12-10 14:25:57 +08:00
parent b431f02ab0
commit bc1517797c
2 changed files with 7 additions and 4 deletions

View File

@ -51,6 +51,7 @@ func (this *UserApi) Login(c *gin.Context) {
return return
} }
f5.GetMsgQueue().FireEvent(constant.MSG_CREATE_USER, q5.Args{user}) f5.GetMsgQueue().FireEvent(constant.MSG_CREATE_USER, q5.Args{user})
service.Task.List(s.GetAccountId(), nil)
} else { } else {
earning := service.Chip.CalcScore(s.GetAccountId()) earning := service.Chip.CalcScore(s.GetAccountId())
if earning > 0 { if earning > 0 {

View File

@ -110,11 +110,13 @@ func (this *task) List(accountId string, data *[]*vo.Mission) (errcode int32, ms
tasksupdate = false tasksupdate = false
} }
if data != nil {
for _, taskitem := range tasks { for _, taskitem := range tasks {
missionVo := new(vo.Mission) missionVo := new(vo.Mission)
missionVo.FromModel(taskitem) missionVo.FromModel(taskitem)
q5.AppendSlice(data, missionVo) q5.AppendSlice(data, missionVo)
} }
}
if tasksupdate { if tasksupdate {
task.UpdateTasks(tasks) task.UpdateTasks(tasks)