1
This commit is contained in:
parent
4079b885e9
commit
290edb3757
@ -49,6 +49,12 @@ func (this *UserApi) Login(c *gin.Context) {
|
||||
if int32(q5.GetDaySeconds(nowTime, 0)) > user.LastPresentDiceTime {
|
||||
user.Dice = mt.Table.Global.GetDailyDiceNum()
|
||||
user.LastPresentDiceTime = q5.ToInt32(nowTime)
|
||||
if result := f5.GetApp().GetOrmDb(constant.WHEEL_DB).Model(user).Select(
|
||||
"dice", "last_present_dice_time").Updates(user); result.Error != nil &&
|
||||
!errors.Is(result.Error, gorm.ErrRecordNotFound) {
|
||||
f5.RspErr(c, 500, "server internal error")
|
||||
return
|
||||
}
|
||||
}
|
||||
rspObj.UserInfo.FromModel(user)
|
||||
c.JSON(200, rspObj)
|
||||
|
Loading…
x
Reference in New Issue
Block a user