mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-25 00:15:06 +08:00
CRM:商机 code review
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
package cn.iocoder.yudao.module.crm.enums.business;
|
||||
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.Getter;
|
||||
@ -8,6 +7,7 @@ import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
// TODO @lzxhqs:1)title、description、create 可以删除,非标准的 javadoc 注释哈,然后可以在类上加下这个类的注释;2)CrmBizEndStatus 改成 CrmBusinessEndStatus,非必要不缩写哈,可阅读比较重要
|
||||
/**
|
||||
* @author lzxhqs
|
||||
* @version 1.0
|
||||
@ -18,12 +18,14 @@ import java.util.Arrays;
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum CrmBizEndStatus implements IntArrayValuable {
|
||||
|
||||
WIN(1, "赢单"),
|
||||
LOSE(2, "输单"),
|
||||
INVALID(3, "无效");
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmBizEndStatus::getStatus).toArray();
|
||||
|
||||
// TODO @lzxhqs:这里的方法,建议放到 49 行之后;一般类里是,静态变量,普通变量;静态方法;普通方法
|
||||
public static boolean isWin(Integer status) {
|
||||
return ObjectUtil.equal(WIN.getStatus(), status);
|
||||
}
|
||||
@ -49,4 +51,5 @@ public enum CrmBizEndStatus implements IntArrayValuable {
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user