This commit is contained in:
aozhiwei 2024-08-05 11:57:17 +08:00
parent 2d721e214e
commit f9a569a366
2 changed files with 5 additions and 3 deletions

View File

@ -105,6 +105,8 @@ func (this *RechargeApi) Buy(c *gin.Context) {
ErrMsg string `json:"errmsg"` ErrMsg string `json:"errmsg"`
Calls []jccommon.ContractCall `json:"calls"` Calls []jccommon.ContractCall `json:"calls"`
}{} }{}
var itemNum int32 = 1
var diamond int64 = 1
url := fmt.Sprintf("%s/webapp/index.php", mt.Table.Web3SignCluster.RandElement().GetUrl()) url := fmt.Sprintf("%s/webapp/index.php", mt.Table.Web3SignCluster.RandElement().GetUrl())
f5.GetHttpCliMgr().SendGoStyleRequest( f5.GetHttpCliMgr().SendGoStyleRequest(
url, url,
@ -132,9 +134,9 @@ func (this *RechargeApi) Buy(c *gin.Context) {
currencyMeta.GetName(), currencyMeta.GetName(),
currencyMeta.GetAddress(), currencyMeta.GetAddress(),
goodsMeta.GetId(), goodsMeta.GetId(),
1, itemNum,
price, price,
1) { diamond) {
f5.RspErr(c, 500, "server internal error") f5.RspErr(c, 500, "server internal error")
return return
} }

View File

@ -8,7 +8,7 @@ import (
func AddRechargeOrder(accountId string, orderId string, shortOrderId string, func AddRechargeOrder(accountId string, orderId string, shortOrderId string,
netId int32, accountAddress string, passportAddress string, netId int32, accountAddress string, passportAddress string,
currencyAddress string, currencyName string, itemId int32, itemNum int64, currencyAddress string, currencyName string, itemId int32, itemNum int32,
price string, diamond int64) bool { price string, diamond int64) bool {
ok := false ok := false
nowTime := f5.GetApp().GetRealSeconds() nowTime := f5.GetApp().GetRealSeconds()