feat:第三方扣款、退款
This commit is contained in:
1 parent
68419fe9ac
commit
e695b288d0
27 files changed
+705
-86
No files matched your search
+1
-1
@@ -12,9 +12,9 @@ import java.util.Arrays;
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum ThirdPayApiBizTypeEnum {
|
||||
|
||||
PAY("10", "支付"),
|
||||
REFUND("20", "退款"),
|
||||
WALLET_INFO("30", "钱包详情"),
|
||||
;
|
||||
|
||||
private final String type;
|
||||
|
||||
+2
@@ -18,7 +18,9 @@ public enum ThirdPayVoStatusEnum {
|
||||
PARAMS_ERROR(500, "参数错误"),
|
||||
USER_EXIST(501, "用户不存在"),
|
||||
ORDER_EXIST(502, "订单不存在"),
|
||||
MCH_EXIST(503, "第三方商户未配置"),
|
||||
BALANCE_NOT_ENOUGH(505, "用户余额不足"),
|
||||
UNKNOWN_ERROR(599, "未知错误,请联系管理员"),
|
||||
;
|
||||
|
||||
private final int type;
|
||||
|
||||
+34
-7
@@ -3,6 +3,8 @@ package com.bsd.pjcloud.thirdparty.dto.pay;
|
||||
import com.bsd.pjcloud.thirdparty.constant.pay.ThirdPaySoureBizTypeEnum;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PayDto {
|
||||
|
||||
@@ -12,18 +14,43 @@ public class PayDto {
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 第三方唯一id
|
||||
* 第三方订单唯一id
|
||||
*/
|
||||
private String thirdOrderId;
|
||||
|
||||
/**
|
||||
* 第三方统一支付类型
|
||||
*/
|
||||
private ThirdPaySoureBizTypeEnum bizType;
|
||||
|
||||
/**
|
||||
* 扣款金额(分)
|
||||
*/
|
||||
private Integer money;
|
||||
private Integer price;
|
||||
|
||||
/**
|
||||
* 商品列表
|
||||
*/
|
||||
private List<Product> products;
|
||||
|
||||
|
||||
@Data
|
||||
public static class Product {
|
||||
|
||||
/**
|
||||
* 商品名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 商品图片(网络可访问)
|
||||
*/
|
||||
private String pic;
|
||||
|
||||
/**
|
||||
* 商品价格(分)
|
||||
*/
|
||||
private Integer price;
|
||||
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private Integer count;
|
||||
|
||||
}
|
||||
}
|
||||
+10
@@ -15,4 +15,14 @@ public class RefundDto {
|
||||
*/
|
||||
private String platformOrderId;
|
||||
|
||||
/**
|
||||
* 第三方退款单号
|
||||
*/
|
||||
private String thirdRefundId;
|
||||
|
||||
/**
|
||||
* 退款金额(单位分)
|
||||
*/
|
||||
private Integer price;
|
||||
|
||||
}
|
||||
pjcloud-thirdparty/pjcloud-thirdparty-api/src/main/java/com/bsd/pjcloud/thirdparty/vo/pay/PayVo.java
Vendored
+2
-2
@@ -18,8 +18,8 @@ public class PayVo {
|
||||
private String thirdOrderId;
|
||||
|
||||
/**
|
||||
* 平台支付时间
|
||||
* 平台支付时间(yyyy-MM-dd HH:mm:ss格式)
|
||||
*/
|
||||
private LocalDateTime payTime;
|
||||
private String payTime;
|
||||
|
||||
}
|
||||
+5
@@ -5,6 +5,11 @@ import lombok.Data;
|
||||
@Data
|
||||
public class PayWalletInfoVo {
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* sm4加密后的手机号
|
||||
*/
|
||||
|
||||
+11
-2
@@ -2,7 +2,6 @@ package com.bsd.pjcloud.thirdparty.vo.pay;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class RefundVo {
|
||||
@@ -22,9 +21,19 @@ public class RefundVo {
|
||||
*/
|
||||
private String thirdOrderId;
|
||||
|
||||
/**
|
||||
* 第三方唯一退款单号
|
||||
*/
|
||||
private String thirdRefundId;
|
||||
|
||||
/**
|
||||
* 退款金额(单位分)
|
||||
*/
|
||||
private Integer price;
|
||||
|
||||
/**
|
||||
* 退款时间
|
||||
*/
|
||||
private LocalDateTime refundTime;
|
||||
private String refundTime;
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user