zk 2 лет назад
Родитель
Сommit
921dd25b2a

+ 46 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/ClientTypeEnum.java

@@ -0,0 +1,46 @@
+package com.sckw.core.model.enums;
+
+/**
+ * @Description 客户端类型枚举
+ * @Author dengyinghui
+ * @Date 2019/4/16
+ */
+public enum ClientTypeEnum {
+    //浏览器-官网
+    pc("浏览器", "pc"),
+    //苹果设备
+    ios("苹果设备", "ios"),
+    //安卓设备
+    android("安卓设备",  "android"),
+    //移动设备
+    mobile("移动端", "mobile"),
+    //第三方API调用
+    api("API调用", "api"),
+    //所有终端
+    terminal("终端", "terminal");
+
+    private String name;
+
+    private String value;
+
+    private ClientTypeEnum(String name, String value){
+        this.name = name;
+        this.value = value;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}

+ 39 - 25
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/EntTypeEnum.java

@@ -1,39 +1,53 @@
 package com.sckw.core.model.enums;
-
-import lombok.Getter;
-
 /**
- * @author czh
- * @desc 企业类型枚举
- * @date 2023/6/15
+ * @Description 客户类型枚举
+ * @Author zk
+ * @Date 2019/4/16
  */
-@Getter
 public enum EntTypeEnum {
+    consignor("贸易", "1"),
+    carrier("采购",  "2"),
+    personal("4P物流", "3"),
+    special("3P物流", "4");
 
-    //供应商
-    SUPPLIER(1, "供应商"),
-    //采购商
-    PURCHASER(2, "采购商"),
-    //34PL物流
-    LOGISTICS34(3, "34PL物流"),
-    //43PL物流
-    LOGISTICS43(4, "43PL物流");
-
-    private final int code;
+    private String name;
 
-    private final String name;
+    private String value;
 
-    EntTypeEnum(int code, String name){
-        this.code = code;
+    /**
+     * @description 构造方法
+     * @author zk
+     * @date 2020/6/08 11:28
+     * @param value 键 name 值
+     * @return
+     **/
+    private EntTypeEnum(String name, String value){
         this.name = name;
+        this.value = value;
     }
 
-    public static EntTypeEnum getName(int code) {
-        for (EntTypeEnum entTypeEnum : values()) {
-            if (entTypeEnum.getCode() == code) {
-                return entTypeEnum;
+    public static String getNameByValue(String value) {
+        for (EntTypeEnum entityEnum : EntTypeEnum.values()) {
+            if (entityEnum.getValue() == value) {
+                return entityEnum.getName();
             }
         }
         return null;
     }
-}
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}