1
This commit is contained in:
parent
f650fb85ec
commit
2d721e214e
@ -47,6 +47,7 @@ func (this *RechargeApi) Buy(c *gin.Context) {
|
||||
reqJson := struct {
|
||||
NetId int32 `json:"net_id"`
|
||||
GoodsId int32 `json:"goods_id"`
|
||||
Num int32 `json:"num"`
|
||||
AccountAddress string `json:"account_address"`
|
||||
}{}
|
||||
if err := c.ShouldBindJSON(&reqJson); err != nil {
|
||||
@ -125,13 +126,15 @@ func (this *RechargeApi) Buy(c *gin.Context) {
|
||||
accountId,
|
||||
orderId,
|
||||
q5.ToString(shortOrderId),
|
||||
reqJson.NetId,
|
||||
reqJson.AccountAddress,
|
||||
passportAddress,
|
||||
currencyMeta.GetName(),
|
||||
currencyMeta.GetAddress(),
|
||||
goodsMeta.GetId(),
|
||||
1,
|
||||
price) {
|
||||
price,
|
||||
1) {
|
||||
f5.RspErr(c, 500, "server internal error")
|
||||
return
|
||||
}
|
||||
|
@ -7,9 +7,9 @@ import (
|
||||
)
|
||||
|
||||
func AddRechargeOrder(accountId string, orderId string, shortOrderId string,
|
||||
accountAddress string, passportAddress string,
|
||||
netId int32, accountAddress string, passportAddress string,
|
||||
currencyAddress string, currencyName string, itemId int32, itemNum int64,
|
||||
price string) bool {
|
||||
price string, diamond int64) bool {
|
||||
ok := false
|
||||
nowTime := f5.GetApp().GetRealSeconds()
|
||||
f5.GetGoStyleDb().UpsertEx(
|
||||
@ -24,6 +24,7 @@ func AddRechargeOrder(accountId string, orderId string, shortOrderId string,
|
||||
{"account_id", accountId},
|
||||
{"order_id", orderId},
|
||||
{"short_order_id", shortOrderId},
|
||||
{"net_id", q5.ToString(netId)},
|
||||
{"account_address", accountAddress},
|
||||
{"passport_address", passportAddress},
|
||||
{"currency_name", currencyName},
|
||||
@ -31,6 +32,7 @@ func AddRechargeOrder(accountId string, orderId string, shortOrderId string,
|
||||
{"item_id", q5.ToString(itemId)},
|
||||
{"item_num", q5.ToString(itemNum)},
|
||||
{"price", price},
|
||||
{"diamond", q5.ToString(diamond)},
|
||||
{"createtime", q5.ToString(nowTime)},
|
||||
{"modifytime", q5.ToString(nowTime)},
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user