|
|
|
@@ -251,8 +251,10 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { |
|
|
|
shareForCardPay(record, record.getCardId(), record.getOrderId(), record.getId()); |
|
|
|
} catch (MallinkException e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
if (ErrorCode.PROFIT_SHARING_NUM_UP_LIMIT.getCode() == e.getErrorCode()) { |
|
|
|
// 分账已到20次限制,后面只记录,无法分账 |
|
|
|
if (ErrorCode.PROFIT_SHARING_NUM_UP_LIMIT.getCode() == e.getErrorCode() || |
|
|
|
ErrorCode.PROFIT_SHARING_TIME_EXPIRED.getCode() == e.getErrorCode()) { |
|
|
|
// 分账已到20次限制,后面只记录,不分账 |
|
|
|
// 分账已过期,后面只记录,不分账 |
|
|
|
logger.error("分账已到20次限制,后面只记录,无法分账"); |
|
|
|
try { |
|
|
|
creteMerchantSubsidy(record, curDate, idWorker, coupon, payment); |
|
|
|
@@ -467,6 +469,12 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL); |
|
|
|
} |
|
|
|
// 分账时间检查 |
|
|
|
WxCouponOrder couponOrder = wxCouponOrderMapper.selectById(cardId); |
|
|
|
if (couponOrder.getExpiredTime().before(new Date())) { |
|
|
|
throw new MallinkException(ErrorCode.PROFIT_SHARING_TIME_EXPIRED); |
|
|
|
} |
|
|
|
|
|
|
|
// 微信分账 |
|
|
|
try { |
|
|
|
WxCardSpend cardSpend = new WxCardSpend(); |
|
|
|
@@ -862,9 +870,18 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { |
|
|
|
shareForCardPay(record, record.getCardId(), record.getOrderId(), record.getId()); |
|
|
|
} catch (MallinkException e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
if (ErrorCode.PROFIT_SHARING_NUM_UP_LIMIT.getCode() == e.getErrorCode()) { |
|
|
|
if (ErrorCode.PROFIT_SHARING_NUM_UP_LIMIT.getCode() == e.getErrorCode() || |
|
|
|
ErrorCode.PROFIT_SHARING_TIME_EXPIRED.getCode() == e.getErrorCode()) { |
|
|
|
// 分账已到20次限制,后面只记录,无法分账 |
|
|
|
// 分账已过期,后面只记录,无法分账 |
|
|
|
logger.error("分账已到20次限制,后面只记录,无法分账"); |
|
|
|
/* |
|
|
|
try { |
|
|
|
creteMerchantSubsidy(record, curDate, idWorker, coupon, payment); |
|
|
|
} catch (Exception ex) { |
|
|
|
logger.error("分账已到20次限制,记录到结算表失败"); |
|
|
|
} |
|
|
|
*/ |
|
|
|
} else { |
|
|
|
throw new MallinkException(e.getErrorCode(), e.getMessage()); |
|
|
|
} |
|
|
|
|