This commit is contained in:
aozhiwei 2024-11-25 17:15:34 +08:00
parent c4b9dfa770
commit cd7ff152c4
2 changed files with 3 additions and 0 deletions

View File

@ -84,6 +84,7 @@ func (this *ActivityApi) RollDice(c *gin.Context) {
f5.RspErr(c, 500, "server internal error7")
return
}
//items := mt.Table.MapGridTable.GetRewardItems()
rspObj.GetOrCreateAward().AddItem(constant.VIRTUAL_ITEM_SCORE, score)
rspObj.GetOrCreateSideEffect().GetOrCreateUser().FromModel(user)
c.JSON(200, rspObj)

View File

@ -23,8 +23,10 @@ func (this *UserApi) Login(c *gin.Context) {
rspObj := struct {
vo.BaseVo
UserInfo vo.User `json:"user_info"`
ServerTime int32 `json:"server_time"`
}{}
nowTime := f5.GetApp().GetRealSeconds()
rspObj.ServerTime = int32(nowTime)
if err, found := user.Find(s.GetAccountId(), nowTime); err != nil {
f5.RspErr(c, 500, "server internal error")
return