CRM-客户:添加分页数据场景过滤
parent
388e07c834
commit
f4c92089e5
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue