|
|
|
@ -50,7 +50,7 @@ func RechargeInfoFirst(c *gin.Context) { |
|
|
|
rechargeInfo := call.GetRechargeInfo(a.UID) |
|
|
|
rechargeInfo := call.GetRechargeInfo(a.UID) |
|
|
|
for _, v := range call.GetConfigFirstPay() { |
|
|
|
for _, v := range call.GetConfigFirstPay() { |
|
|
|
var bonus int64 |
|
|
|
var bonus int64 |
|
|
|
_, per, _ := call.GetConfigFirstPayByCount(v.Amount, rechargeInfo.BuyAmountDataMap) |
|
|
|
_, per, _ := call.GetConfigFirstPayByCount(a.UID, v.Amount, rechargeInfo.BuyAmountDataMap) |
|
|
|
if per > 0 { |
|
|
|
if per > 0 { |
|
|
|
bonus = v.Amount * per / 100 |
|
|
|
bonus = v.Amount * per / 100 |
|
|
|
} |
|
|
|
} |
|
|
|
@ -122,7 +122,7 @@ func RechargeInfo(c *gin.Context) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if _, bonus, _ := call.GetConfigFirstPayByCount(one.Amount, rechargeInfo.BuyAmountDataMap); bonus > 0 { |
|
|
|
if _, bonus, _ := call.GetConfigFirstPayByCount(a.UID, one.Amount, rechargeInfo.BuyAmountDataMap); bonus > 0 { |
|
|
|
one.Bonus = bonus * one.Amount / 100 |
|
|
|
one.Bonus = bonus * one.Amount / 100 |
|
|
|
} |
|
|
|
} |
|
|
|
resp.List = append(resp.List, one) |
|
|
|
resp.List = append(resp.List, one) |
|
|
|
@ -338,7 +338,7 @@ func NewRechargeImp(req *values.RechargeReq, uid, cid int, ip string) *RechargeI |
|
|
|
//per := call.GetConfigFirstPayPerByAmount(notCharge, order.Amount)
|
|
|
|
//per := call.GetConfigFirstPayPerByAmount(notCharge, order.Amount)
|
|
|
|
var times int |
|
|
|
var times int |
|
|
|
if req.Bonus && req.ActivityID == 0 { |
|
|
|
if req.Bonus && req.ActivityID == 0 { |
|
|
|
buyCount, per, topThree := call.GetConfigFirstPayByCount(order.Amount, re.BuyAmountDataMap) |
|
|
|
buyCount, per, topThree := call.GetConfigFirstPayByCount(order.UID, order.Amount, re.BuyAmountDataMap) |
|
|
|
if per > 0 { |
|
|
|
if per > 0 { |
|
|
|
order.Bonus = order.Amount * per / 100 |
|
|
|
order.Bonus = order.Amount * per / 100 |
|
|
|
} |
|
|
|
} |
|
|
|
|