1
This commit is contained in:
parent
d46f12c4aa
commit
e60bcd317a
@ -49,19 +49,16 @@ func (this *BagApi) UseItem(c *gin.Context) {
|
||||
f5.RspErr(c, 401, "params parse error")
|
||||
return
|
||||
}
|
||||
user := new(model.User)
|
||||
bagItem := new(model.Bag)
|
||||
rspObj := struct {
|
||||
vo.BaseVo
|
||||
UserInfo vo.User `json:"user_info"`
|
||||
}{}
|
||||
nowTime := f5.GetApp().GetRealSeconds()
|
||||
if err, found := user.Find(s.GetAccountId(), nowTime); err != nil {
|
||||
if err, found := bagItem.FindByItemUniId(s.GetAccountId(), q5.ToInt64(reqJson.ItemUniId)); err != nil {
|
||||
f5.RspErr(c, 500, "server internal error")
|
||||
return
|
||||
} else if !found {
|
||||
f5.RspErr(c, 1, "server internal error")
|
||||
return
|
||||
}
|
||||
rspObj.UserInfo.FromModel(user)
|
||||
c.JSON(200, rspObj)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user