Merge branch 'feature/crm' of https://gitee.com/puhui999/ruoyi-vue-pro into feature/crm

# Conflicts:
#	yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java
#	yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/convert/contact/ContactConvert.java
#	yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/convert/customer/CrmCustomerConvert.java
#	yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contact/ContactServiceImpl.java
#	yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/CrmCustomerServiceImpl.java
#	yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/convert/dept/PostConvert.java
This commit is contained in:
YunaiV
2023-11-18 22:25:13 +08:00
45 changed files with 756 additions and 497 deletions

View File

@ -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;
}
}