refactor(user): 重构用户服务数据库操作,将reg服务重命名为info并新增talk挖矿服务

This commit is contained in:
1
2025-09-22 17:22:08 +00:00
parent 8b06b9a794
commit 31b82f7698
7 changed files with 146 additions and 14 deletions

View File

@@ -46,6 +46,7 @@ func (h *Controller) Login(data *user.MAIN_LOGIN_IN, c *player.Conn) (result *us
if !IsToday(t.Info.LastResetTime) { //判断是否是今天
t.Info.LastResetTime = time.Now()
//每天login时候检查重置时间然后把电池任务挖矿重置
//挖矿需要单独存,因为防止多开挖矿
t.Info.TimeToday = 0 //重置电池
go func() {
for i := 400; i < 500; i++ { //每日任务区段
@@ -58,6 +59,10 @@ func (h *Controller) Login(data *user.MAIN_LOGIN_IN, c *player.Conn) (result *us
})
}
}
for i := 400; i < 50; i++ { //每日任务区段
t.Info.DailyResArr[i] = 0 //重置每日任务
}
}()
}