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")
|
f5.RspErr(c, 401, "params parse error")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
user := new(model.User)
|
bagItem := new(model.Bag)
|
||||||
rspObj := struct {
|
rspObj := struct {
|
||||||
vo.BaseVo
|
vo.BaseVo
|
||||||
UserInfo vo.User `json:"user_info"`
|
|
||||||
}{}
|
}{}
|
||||||
nowTime := f5.GetApp().GetRealSeconds()
|
if err, found := bagItem.FindByItemUniId(s.GetAccountId(), q5.ToInt64(reqJson.ItemUniId)); err != nil {
|
||||||
if err, found := user.Find(s.GetAccountId(), nowTime); err != nil {
|
|
||||||
f5.RspErr(c, 500, "server internal error")
|
f5.RspErr(c, 500, "server internal error")
|
||||||
return
|
return
|
||||||
} else if !found {
|
} else if !found {
|
||||||
f5.RspErr(c, 1, "server internal error")
|
f5.RspErr(c, 1, "server internal error")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
rspObj.UserInfo.FromModel(user)
|
|
||||||
c.JSON(200, rspObj)
|
c.JSON(200, rspObj)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user