|
|
|
@@ -350,12 +350,16 @@ public class WxCardPayController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
WxCardSpend cardSend = wxCardSpendService.getById(cardSpendId); |
|
|
|
if(cardSend == null || EnumPayType.PAY_PAYMENT.getCode().equals(cardSend.getPayType())){ |
|
|
|
if(cardSend == null || !EnumPayType.PAY_PAYMENT.getCode().equals(cardSend.getPayType())){ |
|
|
|
return new ResultData(ErrorCode.ORDER_IS_NOT_FIND.getCode(), "未找到订单"); |
|
|
|
} |
|
|
|
|
|
|
|
if(!getLoginBUser().getMerchantId().equals(cardSend.getMerchantId())){ |
|
|
|
return new ResultData(ErrorCode.ORDER_IS_NOT_FIND.getCode(), "该门店与订单不匹配"); |
|
|
|
return new ResultData(ErrorCode.ORDER_PAY_REFUND_FAIL.getCode(), "该门店与订单不匹配"); |
|
|
|
} |
|
|
|
|
|
|
|
if(!DateUtils.isSameMonth(new Date(),cardSend.getCreateDate())){ |
|
|
|
return new ResultData(ErrorCode.ORDER_PAY_REFUND_FAIL.getCode(), "只能退本月订单"); |
|
|
|
} |
|
|
|
|
|
|
|
if(refund > cardSend.getDeductionAmount()){ |
|
|
|
|