【代码优化】商城: 满减送活动

This commit is contained in:
puhui999
2024-08-22 18:23:54 +08:00
parent 2b681f90ca
commit 32e25cf4a2
7 changed files with 96 additions and 55 deletions

View File

@@ -15,10 +15,9 @@ import java.util.Arrays;
@AllArgsConstructor
public enum PromotionProductScopeEnum implements IntArrayValuable {
ALL(1, "通用券"), // 全部商品
SPU(2, "商品"), // 指定商品
CATEGORY(3, "品类"), // 指定品类
;
ALL(1, "全部商品"),
SPU(2, "指定商品"),
CATEGORY(3, "指定品类");
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(PromotionProductScopeEnum::getScope).toArray();