adjust
This commit is contained in:
parent
dc85a37f84
commit
482436d6e2
@ -350,6 +350,7 @@ func (gca *GiftCodeApi) UseCode(c *gin.Context) {
|
|||||||
CodeStatus int32 `json:"status"` //0:可用;1:已用;2:不存在
|
CodeStatus int32 `json:"status"` //0:可用;1:已用;2:不存在
|
||||||
Limit int32 `json:"limit"`
|
Limit int32 `json:"limit"`
|
||||||
Content string `json:"content"`
|
Content string `json:"content"`
|
||||||
|
Type int32 `json:"type"`
|
||||||
}{}
|
}{}
|
||||||
codeinfo := new(system.GiftCode)
|
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)
|
||||||
@ -365,6 +366,7 @@ func (gca *GiftCodeApi) UseCode(c *gin.Context) {
|
|||||||
} else {
|
} else {
|
||||||
rspObj.Limit = codeinfo.Limit
|
rspObj.Limit = codeinfo.Limit
|
||||||
rspObj.Content = codeinfo.Content
|
rspObj.Content = codeinfo.Content
|
||||||
|
rspObj.Type = codeinfo.GiftType
|
||||||
}
|
}
|
||||||
|
|
||||||
c.JSON(http.StatusOK, rspObj)
|
c.JSON(http.StatusOK, rspObj)
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Attachment struct {
|
type Attachment struct {
|
||||||
ItemId int32 `json:"itemid"`
|
ItemId int32 `json:"item_id"`
|
||||||
ItemNum int32 `json:"itemnum"`
|
ItemNum int32 `json:"item_num"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type StreamPagination struct {
|
type StreamPagination struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user