价格查询,待处理订单内容

This commit is contained in:
2025-08-14 10:48:59 +08:00
parent 41269572c7
commit 9c932b6ba8
41 changed files with 2371 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
package com.ycwl.basic.pricing.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 优惠券状态枚举
*/
@Getter
@AllArgsConstructor
public enum CouponStatus {
CLAIMED("claimed", "已领取"),
USED("used", "已使用"),
EXPIRED("expired", "已过期");
private final String code;
private final String description;
/**
* 根据代码获取枚举
*/
public static CouponStatus fromCode(String code) {
for (CouponStatus status : values()) {
if (status.code.equals(code)) {
return status;
}
}
throw new IllegalArgumentException("Unknown coupon status code: " + code);
}
}

View File

@@ -0,0 +1,30 @@
package com.ycwl.basic.pricing.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 优惠券类型枚举
*/
@Getter
@AllArgsConstructor
public enum CouponType {
PERCENTAGE("percentage", "百分比折扣"),
FIXED_AMOUNT("fixed_amount", "固定金额减免");
private final String code;
private final String description;
/**
* 根据代码获取枚举
*/
public static CouponType fromCode(String code) {
for (CouponType type : values()) {
if (type.code.equals(code)) {
return type;
}
}
throw new IllegalArgumentException("Unknown coupon type code: " + code);
}
}

View File

@@ -0,0 +1,33 @@
package com.ycwl.basic.pricing.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 商品类型枚举
*/
@Getter
@AllArgsConstructor
public enum ProductType {
VLOG_VIDEO("vlog_video", "Vlog视频"),
RECORDING_SET("recording_set", "录像集"),
PHOTO_SET("photo_set", "照相集"),
PHOTO_PRINT("photo_print", "照片打印"),
MACHINE_PRINT("machine_print", "一体机打印");
private final String code;
private final String description;
/**
* 根据代码获取枚举
*/
public static ProductType fromCode(String code) {
for (ProductType type : values()) {
if (type.code.equals(code)) {
return type;
}
}
throw new IllegalArgumentException("Unknown product type code: " + code);
}
}