From d56b6e2de3affe76e9db4856c81a2e7099a5845f Mon Sep 17 00:00:00 2001 From: cabbage <281119120@qq.com> Date: Fri, 8 Aug 2025 15:35:58 +0800 Subject: [PATCH] =?UTF-8?q?##=20=E5=90=8C=E6=AD=A5=E6=9E=9A=E4=B8=BE?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E5=9B=BD=E9=99=85=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wares/controller/manage/BdWaresController.java | 4 ++-- .../system/enums/controller/EnumsController.java | 2 +- .../com/hzs/common/core/enums/ESpecialArea.java | 13 ++++++++----- .../com/hzs/common/core/enums/EnableStatus.java | 8 ++------ 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/wares/controller/manage/BdWaresController.java b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/wares/controller/manage/BdWaresController.java index aff888b2..e29ceecb 100644 --- a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/wares/controller/manage/BdWaresController.java +++ b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/wares/controller/manage/BdWaresController.java @@ -1260,7 +1260,7 @@ public class BdWaresController extends BaseController { * * @return */ - @PostMapping("get-empty-order-wares") + @PostMapping("/get-empty-order-wares") public AjaxResult getEmptyOrderWares(@RequestBody EmptyOrderWares emptyOrderWares) { List resultList = new ArrayList<>(); for (int i = 0; i < emptyOrderWares.getPkWaresSpecsSkus().size(); i++) { @@ -1278,7 +1278,7 @@ public class BdWaresController extends BaseController { eo.setWaresPrice(ws.getWaresPrice()); eo.setAmountPrice(eo.getWaresPrice().multiply(new BigDecimal(eo.getQuantity()))); eo.setSpecialArea(ws.getSpecialArea()); - eo.setSpecialAreaStr(ESpecialArea.getESpecialArea(ws.getSpecialArea())); + eo.setSpecialAreaStr(ESpecialArea.getLabelByValue(ws.getSpecialArea())); eo.setIsSingle(ws.getIsSingle()); eo.setProductName(ws.getProductName()); LambdaQueryWrapper qer = new LambdaQueryWrapper<>(); diff --git a/bd-business/bd-business-system/src/main/java/com/hzs/system/enums/controller/EnumsController.java b/bd-business/bd-business-system/src/main/java/com/hzs/system/enums/controller/EnumsController.java index 74484410..5094fda4 100644 --- a/bd-business/bd-business-system/src/main/java/com/hzs/system/enums/controller/EnumsController.java +++ b/bd-business/bd-business-system/src/main/java/com/hzs/system/enums/controller/EnumsController.java @@ -446,7 +446,7 @@ public class EnumsController extends BaseController { List enumEntityList = new ArrayList<>(); for (ESpecialArea value : ESpecialArea.values()) { if (value.getEnable() == EnableStatus.ENABLE.getValue()) { - enumEntityList.add(new EnumEntity(value.getValue(), value.getLabel(), EnumsPrefixConstants.SPECIAL_AREA)); + enumEntityList.add(new EnumEntity(value.getValue(), value.getLabel())); } } return AjaxResult.success(enumEntityList); diff --git a/bd-common/bd-common-core/src/main/java/com/hzs/common/core/enums/ESpecialArea.java b/bd-common/bd-common-core/src/main/java/com/hzs/common/core/enums/ESpecialArea.java index c17ccdcc..bf4bb7e0 100644 --- a/bd-common/bd-common-core/src/main/java/com/hzs/common/core/enums/ESpecialArea.java +++ b/bd-common/bd-common-core/src/main/java/com/hzs/common/core/enums/ESpecialArea.java @@ -14,12 +14,12 @@ public enum ESpecialArea { /** * 注册专区 */ - REGISTER_AREA(1, "旧注册专区", 0, EnumsPrefixConstants.SPECIAL_AREA + "1", 3, EMenuDetail.REGISTER.getValue()), + REGISTER_AREA(1, "旧注册专区", 1, EnumsPrefixConstants.SPECIAL_AREA + "1", 3, EMenuDetail.REGISTER.getValue()), /** * 升级专区 */ - UPGRADE_AREA(2, "旧升级专区", 0, EnumsPrefixConstants.SPECIAL_AREA + "2", 4, EMenuDetail.UPGRADE.getValue()), + UPGRADE_AREA(2, "旧升级专区", 1, EnumsPrefixConstants.SPECIAL_AREA + "2", 4, EMenuDetail.UPGRADE.getValue()), /** * 复购专区 @@ -39,7 +39,7 @@ public enum ESpecialArea { /** * 福利专区 */ - WELFARE_AREA(13, "福利专区", 0, EnumsPrefixConstants.SPECIAL_AREA + 13, 9, EMenuDetail.WELFARE_AREA.getValue()), + WELFARE_AREA(13, "福利专区", 1, EnumsPrefixConstants.SPECIAL_AREA + 13, 9, EMenuDetail.WELFARE_AREA.getValue()), /** * 注册专区 @@ -95,13 +95,16 @@ public enum ESpecialArea { */ private final int menuDetailValue; - public static String getESpecialArea(int value) { + public static String getLabelByValue(Integer value) { + if (null == value) { + return ""; + } for (ESpecialArea eSpecialArea : ESpecialArea.values()) { if (eSpecialArea.getValue() == value) { return eSpecialArea.getLabel(); } } - return null; + return ""; } public static ESpecialArea getESpecialAreaEnum(int value) { diff --git a/bd-common/bd-common-core/src/main/java/com/hzs/common/core/enums/EnableStatus.java b/bd-common/bd-common-core/src/main/java/com/hzs/common/core/enums/EnableStatus.java index 9a0dc8c5..efe68c8e 100644 --- a/bd-common/bd-common-core/src/main/java/com/hzs/common/core/enums/EnableStatus.java +++ b/bd-common/bd-common-core/src/main/java/com/hzs/common/core/enums/EnableStatus.java @@ -5,11 +5,7 @@ import lombok.AllArgsConstructor; import lombok.Getter; /** - * @Description: 启用状态 - * @Author: jiang chao - * @Time: 2023/1/4 15:32 - * @Classname: EnableStatus - * @PackageName: com.hzs.common.core.enums + * 启用状态 */ @AllArgsConstructor @Getter @@ -18,7 +14,7 @@ public enum EnableStatus { /** * 已启用 */ - ENABLE(0, "已启用", 0,EnumsPrefixConstants.ENABLE_STATUS + "0"), + ENABLE(0, "已启用", 0, EnumsPrefixConstants.ENABLE_STATUS + "0"), /** * 已禁用