mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-23 15:35:06 +08:00
CRM-客户:添加分页数据场景过滤
This commit is contained in:
@ -0,0 +1,46 @@
|
||||
package cn.iocoder.yudao.module.crm.enums.customer;
|
||||
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* CRM 客户等级
|
||||
*
|
||||
* @author Wanwan
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum CrmCustomerSceneEnum implements IntArrayValuable {
|
||||
|
||||
OWNER(1, "我负责的客户"),
|
||||
FOLLOW(2, "我关注的客户");
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmCustomerSceneEnum::getType).toArray();
|
||||
|
||||
/**
|
||||
* 场景类型
|
||||
*/
|
||||
private final Integer type;
|
||||
/**
|
||||
* 场景名称
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
public static boolean isOwner(Integer type) {
|
||||
return ObjUtil.equal(OWNER.getType(), type);
|
||||
}
|
||||
|
||||
public static boolean isFollow(Integer type) {
|
||||
return ObjUtil.equal(FOLLOW.getType(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user