Эх сурвалжийг харах

feat: 新增众蚁云渠道枚举

李学松 2 жил өмнө
parent
commit
ba58888392

+ 8 - 1
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/enums/GigTypeEnum.java

@@ -22,7 +22,8 @@ public enum GigTypeEnum {
 	YEE(3, "易联数科", "易联数科", YeeCertStatus.class),
 	ZHENG_QI_ZHI_XING(4, "正启之星", "正启之星", ZhengQiZhiXingCertStatus.class),
 	LANG_CHAO(5, "浪潮", "浪潮", LangChaoCertStatus.class),
-	HUI_QI_YUN(6, "汇企云", "汇企云", HuiQiYunCertStatus.class);
+	HUI_QI_YUN(6, "汇企云", "汇企云", HuiQiYunCertStatus.class),
+	ZHONG_YI_YUN(7, "众蚁云", "众蚁云", ZhongYiYunCertStatus.class);
 
 	@EnumValue
 	private int code;
@@ -73,6 +74,9 @@ public enum GigTypeEnum {
 			case HUI_QI_YUN:
 				certStatusStr = HuiQiYunCertStatus.resolve(certStatus).name();
 				break;
+			case ZHONG_YI_YUN:
+				certStatusStr = ZhongYiYunCertStatus.resolve(certStatus).name();
+				break;
 			default:
 		}
 
@@ -110,6 +114,9 @@ public enum GigTypeEnum {
 			case HUI_QI_YUN:
 				certStatusStr = HuiQiYunCertStatus.resolve(certStatus).getMessage();
 				break;
+			case ZHONG_YI_YUN:
+				certStatusStr = ZhongYiYunCertStatus.resolve(certStatus).getMessage();
+				break;
 			default:
 		}
 

+ 4 - 1
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/enums/SubjectLocation.java

@@ -39,7 +39,10 @@ public enum SubjectLocation {
 	JIANG_XI("JIANG_XI",  GigTypeEnum.ZHENG_QI_ZHI_XING, "正启之星-江西", 9),
 
 	// 汇企云
-	HUI_QI_YUN("HUI_QI_YUN", GigTypeEnum.HUI_QI_YUN, "汇企云", 10);
+	HUI_QI_YUN("HUI_QI_YUN", GigTypeEnum.HUI_QI_YUN, "汇企云", 10),
+
+	// 众蚁云
+	ZHONG_YI_YUN("ZHONG_YI_YUN", GigTypeEnum.ZHONG_YI_YUN, "众蚁云", 11);
 
 	@EnumValue
 	private final String type;

+ 39 - 0
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/enums/ZhongYiYunCertStatus.java

@@ -0,0 +1,39 @@
+package com.qunzhixinxi.hnqz.admin.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 众蚁云认证状态
+ *
+ * @author snows
+ * @date 2023/2/1 14:04
+ */
+@Getter
+@AllArgsConstructor
+public enum ZhongYiYunCertStatus {
+
+	// 签约状态
+	UN_SIGN(0, "未签约"),
+	CERT(1, "已认证"),
+	SIGN(2, "已签约");
+
+	private final int code;
+
+	private final String message;
+
+	/**
+	 * 根据枚举编码获取枚举对象
+	 *
+	 * @param code 枚举编码
+	 * @return 如果存在返回枚举,否则返回 {@code null}
+	 */
+	public static ZhongYiYunCertStatus resolve(final int code) {
+		for (ZhongYiYunCertStatus certStatus : ZhongYiYunCertStatus.values()) {
+			if (certStatus.getCode() == code) {
+				return certStatus;
+			}
+		}
+		return UN_SIGN;
+	}
+}