|
|
|
@@ -1178,6 +1178,18 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL); |
|
|
|
} |
|
|
|
|
|
|
|
WxCardSpend cardSpendUpd = new WxCardSpend(); |
|
|
|
cardSpendUpd.setId(cardSend.getId()); |
|
|
|
cardSpendUpd.updateTenantInfo(cardSend); |
|
|
|
cardSpendUpd.setPayStatus(EnumCardSpendStatus.PENDING_REFUND.getCode()); |
|
|
|
cardSpendUpd.setUpdateDate(currentDate); |
|
|
|
try { |
|
|
|
wxCardSpendMapper.updateById(cardSpendUpd); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("卡退款订单修改出错: " + record.toString()); |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL); |
|
|
|
} |
|
|
|
|
|
|
|
refundCardOrderSuccess(record,wxOrder); |
|
|
|
|
|
|
|
return new ResultData(); |
|
|
|
@@ -1188,7 +1200,7 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { |
|
|
|
public ResultData refundCardOrderSuccess(WxRefundOrder refundOrder,WxOrder wxOrder) { |
|
|
|
Long cardSpendId = Long.parseLong(refundOrder.getPayOrderNo()); |
|
|
|
WxCardSpend cardSend = wxCardSpendMapper.selectById(cardSpendId); |
|
|
|
if(cardSend == null || EnumPayType.PAY_PAYMENT.getCode().equals(cardSend.getPayType())){ |
|
|
|
if(cardSend == null){ |
|
|
|
logger.error("付款订单未找到, e:"); |
|
|
|
throw new MallinkException(ErrorCode.ORDER_IS_NOT_FIND); |
|
|
|
} |
|
|
|
@@ -1243,7 +1255,7 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { |
|
|
|
record.setCardRemainAmount(remaingAmount); |
|
|
|
record.setCardBeforeRealAmount(cardInfo.getRemainingShareFeeAmount()); |
|
|
|
record.setCardRemainRealAmount(remain_real_pament); |
|
|
|
record.setPayStatus(EnumCardSpendStatus.PS_SHARED.getCode());//已退款 |
|
|
|
record.setPayStatus(EnumCardSpendStatus.REFUND_SUCCESS.getCode());//已退款 |
|
|
|
|
|
|
|
record.setCreateDate(currentDate); |
|
|
|
record.setUpdateDate(currentDate); |
|
|
|
@@ -1276,6 +1288,18 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { |
|
|
|
throw new MallinkException(ErrorCode.ORDER_UPDATE_ERR); |
|
|
|
} |
|
|
|
|
|
|
|
WxCardSpend cardSpendUpd = new WxCardSpend(); |
|
|
|
cardSpendUpd.setId(cardSend.getId()); |
|
|
|
cardSpendUpd.updateTenantInfo(cardSend); |
|
|
|
cardSpendUpd.setPayStatus(EnumCardSpendStatus.REFUND_SUCCESS.getCode()); |
|
|
|
cardSpendUpd.setUpdateDate(currentDate); |
|
|
|
try { |
|
|
|
wxCardSpendMapper.updateById(cardSpendUpd); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("卡退款订单修改出错: " + record.toString()); |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
WxCardInfo updateCardInfo = new WxCardInfo(); |
|
|
|
updateCardInfo.setId(cardInfo.getId()); |
|
|
|
|