make
This commit is contained in:
parent
9fcc66005a
commit
288b7d1de9
@ -167,8 +167,8 @@ func (this *RechargeApi) internalBuy(c *gin.Context,
|
||||
return
|
||||
}
|
||||
}
|
||||
price := q5.PowInt64(10, currencyMeta.GetCurrencyDecimal()) * q5.ToInt64(goodsMeta.GetPrice()) *
|
||||
q5.ToInt64(goodsNum)
|
||||
srcPrice := q5.ToInt64(goodsMeta.GetPrice()) * q5.ToInt64(goodsNum)
|
||||
price := q5.PowInt64(10, currencyMeta.GetCurrencyDecimal()) * srcPrice
|
||||
if price <= 0 || price < q5.ToInt64(goodsMeta.GetPrice()) {
|
||||
f5.RspErr(c, 3, "server internal error")
|
||||
return
|
||||
@ -220,6 +220,7 @@ func (this *RechargeApi) internalBuy(c *gin.Context,
|
||||
goodsMeta.GetId(),
|
||||
itemNum,
|
||||
price,
|
||||
srcPrice,
|
||||
diamond,
|
||||
presentDiamond,
|
||||
email) {
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
func AddRechargeOrder(orderId string, shortOrderId string,
|
||||
netId int32, accountAddress string, passportAddress string,
|
||||
currencyAddress string, currencyName string, itemId int32, itemNum int32,
|
||||
price int64, diamond int64, presentDiamond int64, email string) bool {
|
||||
price int64, srcPrice int64, diamond int64, presentDiamond int64, email string) bool {
|
||||
ok := false
|
||||
nowTime := f5.GetApp().GetRealSeconds()
|
||||
fields := [][]string{
|
||||
@ -25,6 +25,7 @@ func AddRechargeOrder(orderId string, shortOrderId string,
|
||||
{"price", q5.ToString(price)},
|
||||
{"diamond", q5.ToString(diamond)},
|
||||
{"present_diamond", q5.ToString(presentDiamond)},
|
||||
{"return_contribution", q5.ToString(srcPrice * 1)},
|
||||
{"createtime", q5.ToString(nowTime)},
|
||||
{"modifytime", q5.ToString(nowTime)},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user