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