|
|
|
@@ -206,7 +206,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { |
|
|
|
Integer subsidyFee = subsidyFeeD.intValue(); |
|
|
|
logger.info("补贴额: " + subsidyFee); |
|
|
|
if (cardInfo.getSaleAmount().equals(0) || subsidyFee > 0) { |
|
|
|
// 有补贴时入库 |
|
|
|
// 有补贴时入库, 免费卡消费时, 或者有补贴金额时 |
|
|
|
int iSubChargeFee = PayUtils.getPayRate(subsidyFee, payAccount.getRate(), false); |
|
|
|
Integer realSubsidyFee = subsidyFee - iSubChargeFee; |
|
|
|
WxMerchantSubsidy merchantSubsidy = new WxMerchantSubsidy(); |
|
|
|
@@ -246,8 +246,9 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { |
|
|
|
} |
|
|
|
|
|
|
|
if (payAccount.checkShare()) { |
|
|
|
// 分账 |
|
|
|
if (cardInfo.isBuyed()) { |
|
|
|
// 9. 有价卡分账 |
|
|
|
// 9. 只有有价卡才能分账 |
|
|
|
try { |
|
|
|
shareForCardPay(record, record.getCardId(), record.getOrderId(), record.getId()); |
|
|
|
} catch (MallinkException e) { |
|
|
|
@@ -268,7 +269,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 有价储值卡-补贴 |
|
|
|
// 有价储值卡消费时,如果未启用分账,金额也记入补贴表,可能会导致查询错误, TODO |
|
|
|
if (cardInfo.isBuyed() && payment > 0) { |
|
|
|
try { |
|
|
|
creteMerchantSubsidy(record, curDate, idWorker, coupon, payment); |
|
|
|
|