## 同步枚举以及国际化;
This commit is contained in:
parent
8a943cd3fe
commit
302a3563b9
|
@ -1260,7 +1260,7 @@ public class BdWaresController extends BaseController {
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("get-empty-order-wares")
|
@PostMapping("/get-empty-order-wares")
|
||||||
public AjaxResult getEmptyOrderWares(@RequestBody EmptyOrderWares emptyOrderWares) {
|
public AjaxResult getEmptyOrderWares(@RequestBody EmptyOrderWares emptyOrderWares) {
|
||||||
List<EmptyOrderWares> resultList = new ArrayList<>();
|
List<EmptyOrderWares> resultList = new ArrayList<>();
|
||||||
for (int i = 0; i < emptyOrderWares.getPkWaresSpecsSkus().size(); i++) {
|
for (int i = 0; i < emptyOrderWares.getPkWaresSpecsSkus().size(); i++) {
|
||||||
|
@ -1278,7 +1278,7 @@ public class BdWaresController extends BaseController {
|
||||||
eo.setWaresPrice(ws.getWaresPrice());
|
eo.setWaresPrice(ws.getWaresPrice());
|
||||||
eo.setAmountPrice(eo.getWaresPrice().multiply(new BigDecimal(eo.getQuantity())));
|
eo.setAmountPrice(eo.getWaresPrice().multiply(new BigDecimal(eo.getQuantity())));
|
||||||
eo.setSpecialArea(ws.getSpecialArea());
|
eo.setSpecialArea(ws.getSpecialArea());
|
||||||
eo.setSpecialAreaStr(ESpecialArea.getESpecialArea(ws.getSpecialArea()));
|
eo.setSpecialAreaStr(ESpecialArea.getLabelByValue(ws.getSpecialArea()));
|
||||||
eo.setIsSingle(ws.getIsSingle());
|
eo.setIsSingle(ws.getIsSingle());
|
||||||
eo.setProductName(ws.getProductName());
|
eo.setProductName(ws.getProductName());
|
||||||
LambdaQueryWrapper<BdWaresSpecsRelation> qer = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresSpecsRelation> qer = new LambdaQueryWrapper<>();
|
||||||
|
|
|
@ -446,7 +446,7 @@ public class EnumsController extends BaseController {
|
||||||
List<EnumEntity> enumEntityList = new ArrayList<>();
|
List<EnumEntity> enumEntityList = new ArrayList<>();
|
||||||
for (ESpecialArea value : ESpecialArea.values()) {
|
for (ESpecialArea value : ESpecialArea.values()) {
|
||||||
if (value.getEnable() == EnableStatus.ENABLE.getValue()) {
|
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);
|
return AjaxResult.success(enumEntityList);
|
||||||
|
|
|
@ -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;
|
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()) {
|
for (ESpecialArea eSpecialArea : ESpecialArea.values()) {
|
||||||
if (eSpecialArea.getValue() == value) {
|
if (eSpecialArea.getValue() == value) {
|
||||||
return eSpecialArea.getLabel();
|
return eSpecialArea.getLabel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ESpecialArea getESpecialAreaEnum(int value) {
|
public static ESpecialArea getESpecialAreaEnum(int value) {
|
||||||
|
|
|
@ -5,11 +5,7 @@ import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 启用状态
|
* 启用状态
|
||||||
* @Author: jiang chao
|
|
||||||
* @Time: 2023/1/4 15:32
|
|
||||||
* @Classname: EnableStatus
|
|
||||||
* @PackageName: com.hzs.common.core.enums
|
|
||||||
*/
|
*/
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Getter
|
@Getter
|
||||||
|
@ -18,7 +14,7 @@ public enum EnableStatus {
|
||||||
/**
|
/**
|
||||||
* 已启用
|
* 已启用
|
||||||
*/
|
*/
|
||||||
ENABLE(0, "已启用", 0,EnumsPrefixConstants.ENABLE_STATUS + "0"),
|
ENABLE(0, "已启用", 0, EnumsPrefixConstants.ENABLE_STATUS + "0"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 已禁用
|
* 已禁用
|
||||||
|
|
Loading…
Reference in New Issue