adjust
This commit is contained in:
parent
05b1efcd3b
commit
ab1a4fbd46
@ -26,6 +26,17 @@ func (iga *InGameApi) PreOrder(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rspObj := struct {
|
||||||
|
ErrorCode int32 `json:"errcode"`
|
||||||
|
ErrMsg string `json:"errmsg"`
|
||||||
|
OrderId string `json:"order_id"`
|
||||||
|
}{}
|
||||||
|
|
||||||
|
if !f5.IsOnlineEnv() {
|
||||||
|
c.JSON(200, rspObj)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
data, ret := iga.checkSessionData(c, reqJson.AccountId)
|
data, ret := iga.checkSessionData(c, reqJson.AccountId)
|
||||||
if !ret {
|
if !ret {
|
||||||
return
|
return
|
||||||
@ -47,15 +58,7 @@ func (iga *InGameApi) PreOrder(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
rspObj := struct {
|
rspObj.OrderId = order.OrderId
|
||||||
ErrorCode int32 `json:"errcode"`
|
|
||||||
ErrMsg string `json:"errmsg"`
|
|
||||||
OrderId string `json:"order_id"`
|
|
||||||
}{
|
|
||||||
0,
|
|
||||||
"",
|
|
||||||
order.OrderId,
|
|
||||||
}
|
|
||||||
|
|
||||||
c.JSON(200, rspObj)
|
c.JSON(200, rspObj)
|
||||||
}
|
}
|
||||||
@ -270,6 +273,23 @@ func (iga *InGameApi) OrderInfo(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !f5.IsOnlineEnv() {
|
||||||
|
rspObj := struct {
|
||||||
|
ErrorCode int32 `json:"errcode"`
|
||||||
|
ErrMsg string `json:"errmsg"`
|
||||||
|
OrderId string `json:"order_id"`
|
||||||
|
GoodsId int32 `json:"goods_id"`
|
||||||
|
Count int32 `json:"count"`
|
||||||
|
Others int32 `json:"others"`
|
||||||
|
Status int32 `json:"status"`
|
||||||
|
}{
|
||||||
|
OrderId: reqJson.OrderId,
|
||||||
|
Status: 1,
|
||||||
|
}
|
||||||
|
c.JSON(200, rspObj)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
data, ret := iga.checkSessionData(c, reqJson.AccountId)
|
data, ret := iga.checkSessionData(c, reqJson.AccountId)
|
||||||
if !ret {
|
if !ret {
|
||||||
return
|
return
|
||||||
@ -300,12 +320,6 @@ func (iga *InGameApi) OrderInfo(c *gin.Context) {
|
|||||||
Status: orderModel.Status,
|
Status: orderModel.Status,
|
||||||
}
|
}
|
||||||
|
|
||||||
if !f5.IsOnlineEnv() {
|
|
||||||
count, _ := service.Wxpay.GetGoodsCount(q5.SafeToInt64(data["gameid"]), int64(orderModel.ItemId))
|
|
||||||
rspObj.Count = int32(count)
|
|
||||||
rspObj.Status = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
c.JSON(200, rspObj)
|
c.JSON(200, rspObj)
|
||||||
|
|
||||||
if orderModel.Status == 0 {
|
if orderModel.Status == 0 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user