Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* describe:
|
||||
*
|
||||
* @author zhouyiping
|
||||
* @date 2020/10/13
|
||||
*/
|
||||
public enum AuthRoleEnum {
|
||||
/**
|
||||
* 全企业数据
|
||||
*/
|
||||
ALL("all", "全企业数据"),
|
||||
|
||||
/**
|
||||
* 所在组织架构包含下级
|
||||
*/
|
||||
INCLUDE_SUBORDINATE("include_subordinate","所在组织架构包含下级"),
|
||||
|
||||
|
||||
// /**
|
||||
// * 所在的组织架构不包含下级
|
||||
// */
|
||||
NOT_INCLUDE_SUBORDINATE("not_include_subordinate","所在的组织架构不包含下级"),
|
||||
|
||||
/**
|
||||
* 仅自己的数据
|
||||
*/
|
||||
PERSONAL("personal","仅自己的数据");
|
||||
|
||||
private String code;
|
||||
private String msg;
|
||||
|
||||
protected static final Map<String, AuthRoleEnum> map = Arrays.stream(values()).collect(
|
||||
Collectors.toMap(AuthRoleEnum::getCode, Function.identity()));
|
||||
|
||||
AuthRoleEnum(String code, String msg){
|
||||
this.code=code;
|
||||
this.msg=msg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
public static AuthRoleEnum getByCode(String code) {
|
||||
return map.get(code);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author zyp
|
||||
*/
|
||||
public enum UserAuthMappingTypeEnum {
|
||||
/**
|
||||
* 区域
|
||||
*/
|
||||
REGION("region","区域"),
|
||||
/**
|
||||
* 门店
|
||||
*/
|
||||
STORE("store","门店");
|
||||
|
||||
private String code;
|
||||
private String desc;
|
||||
public static final Map<String, UserAuthMappingTypeEnum> map = Arrays.stream(values()).collect(
|
||||
Collectors.toMap(UserAuthMappingTypeEnum::getCode, Function.identity()));
|
||||
|
||||
UserAuthMappingTypeEnum(String code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public static UserAuthMappingTypeEnum getByCode(String code) {
|
||||
return map.get(code);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user