2
0

feat: 退款审批

This commit is contained in:
caiyuchao
2025-03-31 10:25:14 +08:00
parent 1a65c76613
commit 5f46f3044b
36 changed files with 942 additions and 88 deletions

View File

@@ -22,6 +22,10 @@ public class ServiceNameConstants
*/
public static final String FILE_SERVICE = "wfc-file";
/**
* 支付服务的serviceid
*/
public static final String PAYMENT_SERVICE = "wfc-payment";
/**
* 用户平台模块的 service_id

View File

@@ -0,0 +1,24 @@
package org.wfc.common.core.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @description: 订单状态枚举
* @author: cyc
* @since: 2024-12-23
*/
@Getter
@AllArgsConstructor
public enum OrderStatusEnum {
UNPAID(0, "未支付"),
PAID(1, "已支付"),
CANCELLED(2, "已取消"),
REFUNDING(3, "退款中"),
REFUNDED(4, "已退款"),
;
private final Integer code;
private final String desc;
}

View File

@@ -0,0 +1,33 @@
package org.wfc.common.core.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @description: 支付方式枚举
* @author: cyc
* @since: 2025-03-27
*/
@Getter
@AllArgsConstructor
public enum PaymentTypeEnum {
BALANCE(0, "余额"),
ALIPAY(1, "支付宝"),
WX_PAY(2, "微信");
private final Integer code;
private final String desc;
public static PaymentTypeEnum getByCode(Integer code) {
if (code == null) {
return null;
}
for (PaymentTypeEnum typeEnum : PaymentTypeEnum.values()) {
if (typeEnum.getCode().equals(code)) {
return typeEnum;
}
}
return null;
}
}

View File

@@ -0,0 +1,22 @@
package org.wfc.common.core.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @description: 退款状态枚举
* @author: cyc
* @since: 2025-03-26
*/
@Getter
@AllArgsConstructor
public enum RefundStatusEnum {
PENDING(0, "待审批"),
PASSED(1, "已通过"),
REJECTED(2, "已驳回"),
EXPIRED(3, "已过期");
private final Integer code;
private final String desc;
}