fix
This commit is contained in:
parent
5a78d63c9e
commit
27cbd85a84
@ -353,11 +353,11 @@ func (gca *GiftCodeApi) UseCode(c *gin.Context) {
|
||||
Type int32 `json:"type"`
|
||||
}{}
|
||||
codeinfo := new(system.GiftCode)
|
||||
db := f5.GetApp().GetOrmDb(constant.ACCOUNT_DB).Table(codeinfo.TableName()).Take(codeinfo, "gameid = ? AND gift_code = '?'", req.GameId, req.Code)
|
||||
db := f5.GetApp().GetOrmDb(constant.ACCOUNT_DB).Table(codeinfo.TableName()).Take(codeinfo, "gameid = ? AND gift_code = ?", req.GameId, req.Code)
|
||||
err := db.Error
|
||||
if err != nil {
|
||||
if !f5.IsOrmErrRecordNotFound(err) {
|
||||
f5.RspErr2(c, 1, err.Error())
|
||||
f5.RspErr(c, 1, err.Error())
|
||||
return
|
||||
}
|
||||
rspObj.CodeStatus = 2
|
||||
|
Loading…
x
Reference in New Issue
Block a user