优化退款逻辑

This commit is contained in:
jason
2022-01-03 22:32:39 +08:00
parent 9a5f085369
commit 5bf3045544
16 changed files with 63 additions and 157 deletions

View File

@ -37,8 +37,8 @@ public class PayRefundController {
PayRefundReqDTO req = PayRefundConvert.INSTANCE.convert(reqVO);
req.setUserIp(getClientIP());
//TODO 测试暂时模拟生成商户退款订单
if(StrUtil.isEmpty(reqVO.getMerchantRefundNo())) {
req.setMerchantRefundNo(PaySeqUtils.genMerchantRefundNo());
if(StrUtil.isEmpty(reqVO.getMerchantRefundId())) {
req.setMerchantRefundId(PaySeqUtils.genMerchantRefundNo());
}
return CommonResult.success( PayRefundConvert.INSTANCE.convert(payRefundCoreService.submitRefundOrder(req)));
}

View File

@ -29,6 +29,6 @@ public class PayRefundReqVO {
@ApiModelProperty(value = "商户退款订单号", required = true, example = "MR202111180000000001")
//TODO 测试暂时模拟生成
//@NotEmpty(message = "商户退款订单号")
private String merchantRefundNo;
private String merchantRefundId;
}

View File

@ -15,23 +15,6 @@ import lombok.experimental.Accessors;
@AllArgsConstructor
public class PayRefundRespVO {
/**
* 渠道返回结果
* 退款处理中和退款成功 返回 1
* 失败和其他情况 返回 2
*/
private Integer channelReturnResult;
/**
* 渠道返回code
*/
private String channelReturnCode;
/**
* 渠道返回消息
*/
private String channelReturnMsg;
/**
* 支付退款单编号, 自增
*/