mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-23 23:45:08 +08:00
CRM: 完善 code review 数据权限提到的问题,重新封装 CrmQueryWrapperUtils
This commit is contained in:
@ -7,7 +7,6 @@ import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
// TODO @puhui999:这个枚举,要不改成 CrmSceneTypeEnum
|
||||
/**
|
||||
* CRM 列表检索场景
|
||||
*
|
||||
@ -15,14 +14,14 @@ import java.util.Arrays;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum CrmSceneEnum implements IntArrayValuable {
|
||||
public enum CrmSceneTypeEnum implements IntArrayValuable {
|
||||
|
||||
OWNER(1, "我负责的"),
|
||||
FOLLOW(2, "我关注的"),
|
||||
// TODO @puhui999:还有一个我参与的
|
||||
SUBORDINATE(3, "下属负责的");
|
||||
INVOLVED(3, "我参与的"),
|
||||
SUBORDINATE(4, "下属负责的");
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmSceneEnum::getType).toArray();
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmSceneTypeEnum::getType).toArray();
|
||||
|
||||
/**
|
||||
* 场景类型
|
||||
@ -41,6 +40,10 @@ public enum CrmSceneEnum implements IntArrayValuable {
|
||||
return ObjUtil.equal(FOLLOW.getType(), type);
|
||||
}
|
||||
|
||||
public static boolean isInvolved(Integer type) {
|
||||
return ObjUtil.equal(INVOLVED.getType(), type);
|
||||
}
|
||||
|
||||
public static boolean isSubordinate(Integer type) {
|
||||
return ObjUtil.equal(SUBORDINATE.getType(), type);
|
||||
}
|
Reference in New Issue
Block a user