Browse Source

文件业务类型定义

dengsixing 3 years ago
parent
commit
7a757a5061

+ 1 - 0
4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/ErrorCode.java

@@ -140,6 +140,7 @@ public enum ErrorCode {
 
     FAILURE_CODE_7001(7001, "激光场景状态同步失败,请重试!"),
     FAILURE_CODE_7002(7002, "大场景号不能为空"),
+    FAILURE_CODE_7003(7003, "文件类型不正确!"),
 
 
 

+ 39 - 0
4dkankan-common-utils/src/main/java/com/fdkankan/common/constant/FileBizType.java

@@ -0,0 +1,39 @@
+package com.fdkankan.common.constant;
+
+/**
+ * 文件业务类型
+ */
+public enum FileBizType {
+
+    FLOOR_LOGO("floorLogo", "地板logo"),
+    MUSIC("music", "背景音乐");
+
+    private String code;
+    private String message;
+
+    private FileBizType(String code, String message) {
+        this.code = code;
+        this.message = message;
+    }
+
+    public String code() {
+        return code;
+    }
+
+    public String message() {
+        return message;
+    }
+
+    public static FileBizType get(String code){
+        FileBizType[] values = FileBizType.values();
+        String enumValue = null;
+        for(FileBizType eachValue : values){
+            enumValue = eachValue.code();
+            if(enumValue.equals(code)){
+                return eachValue;
+            }
+        }
+        return null;
+    }
+
+}