|
|
@@ -232,7 +232,7 @@ func (self *PayController) payExchange(oId, payWay, returnUrl, source, remark st
|
|
|
|
|
|
quanLittle := false
|
|
|
useCoupon = true
|
|
|
- if useCoupon {
|
|
|
+ if useCoupon && userLeftBalanceCount > 0 {
|
|
|
if userLeftBalanceCount < total_quan {
|
|
|
quanLittle = true
|
|
|
totalCoupon = userLeftBalanceCount
|
|
|
@@ -258,12 +258,13 @@ func (self *PayController) payExchange(oId, payWay, returnUrl, source, remark st
|
|
|
//抵扣佣金
|
|
|
paiedCash := int64(0)
|
|
|
userLeftBalanceCash := balance_model.GetUserTotalBalance(wxUId)
|
|
|
- if userLeftBalanceCash < total_weixin && total_weixin > 0 && userLeftBalanceCash > 0 {
|
|
|
- paiedCash = userLeftBalanceCash
|
|
|
- } else {
|
|
|
- paiedCash = total_weixin
|
|
|
+ if userLeftBalanceCash > int64(0) {
|
|
|
+ if userLeftBalanceCash < total_weixin && total_weixin > 0 {
|
|
|
+ paiedCash = userLeftBalanceCash
|
|
|
+ } else {
|
|
|
+ paiedCash = total_weixin
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
total_weixin = total_weixin - paiedCash
|
|
|
|
|
|
//特殊促销期间券不够不允许支付
|