20 changed files with 337 additions and 90 deletions
@ -0,0 +1,32 @@ |
|||
package com.bnyer.common.core.enums; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Getter; |
|||
|
|||
import java.util.Arrays; |
|||
|
|||
/** |
|||
* @author :WXC |
|||
* @description : |
|||
*/ |
|||
@Getter |
|||
@AllArgsConstructor |
|||
public enum EnumRefundStatus { |
|||
|
|||
NO_REFUND(1000,"未退款"), |
|||
FAILS(1001,"退款失败"), |
|||
SUCCESS(1002,"退款成功"), |
|||
PROCESS(1003,"退款中"), |
|||
; |
|||
|
|||
private final int status; |
|||
|
|||
private final String name; |
|||
|
|||
public static EnumRefundStatus getEnumStatusByStatus(int status) { |
|||
return Arrays.stream(values()) |
|||
.filter(payStatus -> payStatus.getStatus() == status) |
|||
.findFirst().orElseThrow(() -> new SecurityException("status 未匹配上对应的支付状态")); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
package com.bnyer.pay.bean.vo; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Getter; |
|||
import lombok.Setter; |
|||
|
|||
/** |
|||
* @author :WXC |
|||
* @Date :2023/05/15 |
|||
* @description : |
|||
*/ |
|||
@Getter |
|||
@Setter |
|||
public class ThirdPayBaseVo { |
|||
|
|||
@ApiModelProperty(value="错误码") |
|||
private String thirdCode; |
|||
|
|||
@ApiModelProperty(value="错误信息") |
|||
private String thirdMsg; |
|||
|
|||
@ApiModelProperty(value="流水号") |
|||
private String thirdNo; |
|||
|
|||
@ApiModelProperty(value = "完成时间") |
|||
private String successTime; |
|||
} |
|||
@ -1,10 +1,67 @@ |
|||
package com.bnyer.pay.bean.vo; |
|||
|
|||
import lombok.Data; |
|||
import lombok.Getter; |
|||
import lombok.Setter; |
|||
|
|||
/** |
|||
* @author :WXC |
|||
* @Date :2023/05/08 |
|||
* @description : |
|||
* @description :第三方支付退款信息 |
|||
*/ |
|||
public class ThirdRefundVo { |
|||
@Getter |
|||
@Setter |
|||
public class ThirdRefundVo extends ThirdPayBaseVo{ |
|||
|
|||
/** |
|||
* 微信退款信息 |
|||
*/ |
|||
private WxRefundVo wxRefundVo; |
|||
|
|||
/** |
|||
* 支付宝退款信息 |
|||
*/ |
|||
private AliRefundVo aliRefundVo; |
|||
|
|||
/** |
|||
* 抖音退款信息 |
|||
*/ |
|||
private DyRefundVo dyRefundVo; |
|||
|
|||
/** |
|||
* 快手退款信息 |
|||
*/ |
|||
private KsRefundVo ksRefundVo; |
|||
|
|||
@Data |
|||
public static class WxRefundVo{ |
|||
/** |
|||
* 退款状态 |
|||
* SUCCESS:退款成功 |
|||
* CLOSED:退款关闭 |
|||
* PROCESSING:退款处理中 |
|||
* ABNORMAL:退款异常 |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 退款渠道 |
|||
* ORIGINAL—原路退款 |
|||
* BALANCE—退回到余额 |
|||
* OTHER_BALANCE—原账户异常退到其他余额账户 |
|||
* OTHER_BANKCARD—原银行卡异常退到其他银行卡 |
|||
* 示例值:ORIGINAdL |
|||
*/ |
|||
private String channel; |
|||
} |
|||
|
|||
@Data |
|||
public static class AliRefundVo{} |
|||
|
|||
@Data |
|||
public static class DyRefundVo{} |
|||
|
|||
@Data |
|||
public static class KsRefundVo{} |
|||
|
|||
} |
|||
|
|||
Loading…
Reference in new issue