## 同步枚举以及国际化;
This commit is contained in:
parent
264012c660
commit
d56b6e2de3
|
@ -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<EmptyOrderWares> 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<BdWaresSpecsRelation> qer = new LambdaQueryWrapper<>();
|
||||
|
|
|
@ -446,7 +446,7 @@ public class EnumsController extends BaseController {
|
|||
List<EnumEntity> 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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue