1
This commit is contained in:
parent
2883eea86e
commit
77712249a2
@ -174,7 +174,8 @@ func (this *RechargeApi) internalBuy(c *gin.Context,
|
||||
goodsMeta.GetId(),
|
||||
itemNum,
|
||||
q5.ToString(price),
|
||||
diamond) {
|
||||
diamond,
|
||||
email) {
|
||||
f5.RspErr(c, 500, "server internal error")
|
||||
return
|
||||
}
|
||||
|
@ -9,9 +9,27 @@ import (
|
||||
func AddRechargeOrder(orderId string, shortOrderId string,
|
||||
netId int32, accountAddress string, passportAddress string,
|
||||
currencyAddress string, currencyName string, itemId int32, itemNum int32,
|
||||
price string, diamond int64) bool {
|
||||
price string, diamond int64, email string) bool {
|
||||
ok := false
|
||||
nowTime := f5.GetApp().GetRealSeconds()
|
||||
fields := [][]string{
|
||||
{"order_id", orderId},
|
||||
{"short_order_id", shortOrderId},
|
||||
{"net_id", q5.ToString(netId)},
|
||||
{"account_address", accountAddress},
|
||||
{"passport_address", passportAddress},
|
||||
{"currency_name", currencyName},
|
||||
{"currency_address", currencyAddress},
|
||||
{"item_id", q5.ToString(itemId)},
|
||||
{"item_num", q5.ToString(itemNum)},
|
||||
{"price", price},
|
||||
{"diamond", q5.ToString(diamond)},
|
||||
{"createtime", q5.ToString(nowTime)},
|
||||
{"modifytime", q5.ToString(nowTime)},
|
||||
}
|
||||
if email != "" {
|
||||
q5.AppendSlice(&fields, []string{"email", email})
|
||||
}
|
||||
f5.GetGoStyleDb().UpsertEx(
|
||||
constant.BCNFT_DB,
|
||||
"t_recharge_order",
|
||||
@ -20,21 +38,7 @@ func AddRechargeOrder(orderId string, shortOrderId string,
|
||||
},
|
||||
[][]string{
|
||||
},
|
||||
[][]string{
|
||||
{"order_id", orderId},
|
||||
{"short_order_id", shortOrderId},
|
||||
{"net_id", q5.ToString(netId)},
|
||||
{"account_address", accountAddress},
|
||||
{"passport_address", passportAddress},
|
||||
{"currency_name", currencyName},
|
||||
{"currency_address", currencyAddress},
|
||||
{"item_id", q5.ToString(itemId)},
|
||||
{"item_num", q5.ToString(itemNum)},
|
||||
{"price", price},
|
||||
{"diamond", q5.ToString(diamond)},
|
||||
{"createtime", q5.ToString(nowTime)},
|
||||
{"modifytime", q5.ToString(nowTime)},
|
||||
},
|
||||
fields,
|
||||
func (err error, lastInsertId int64, rowsAffected int64) {
|
||||
ok = err == nil
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user