写死菜单
This commit is contained in:
@@ -74,6 +74,8 @@ public class CommonConstants {
|
||||
public static final String DELETE_DEPT_ID = "-1";
|
||||
public static final String AI_USER_ID = "a100000001";
|
||||
|
||||
public static final long ZERO_LONG = 0L;
|
||||
|
||||
public static final int ZERO = 0;
|
||||
public static final int ONE = 1;
|
||||
public static final int TWO = 2;
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: MentTypeEnum
|
||||
* @Description:
|
||||
* @date 2021-09-23 17:59
|
||||
*/
|
||||
public enum MenuTypeEnum {
|
||||
|
||||
|
||||
MENU(1,"菜单"),
|
||||
AUTH(2,"权限");
|
||||
|
||||
private Integer code;
|
||||
|
||||
private String message;
|
||||
|
||||
MenuTypeEnum(Integer code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: PlatFormTypeEnum
|
||||
* @Description:
|
||||
* @date 2023-06-08 16:43
|
||||
*/
|
||||
public enum PlatFormTypeEnum {
|
||||
|
||||
/**
|
||||
* 菜单类型
|
||||
*/
|
||||
PC("PC","pc端菜单"),
|
||||
;
|
||||
|
||||
private String code;
|
||||
private String msg;
|
||||
|
||||
protected static final Map<String, PlatFormTypeEnum> map = Arrays.stream(values()).collect(
|
||||
Collectors.toMap(PlatFormTypeEnum::getCode, Function.identity()));
|
||||
|
||||
PlatFormTypeEnum(String code, String msg){
|
||||
this.code=code;
|
||||
this.msg=msg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
public static PlatFormTypeEnum getByCode(String code) {
|
||||
return map.get(code);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user