From d06c577a634528b11bc4b83c2769f48992913cad Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 30 十月 2023 09:07:30 +0800
Subject: [PATCH] 修复bug

---
 server/services/src/main/java/com/doumee/core/constants/Constants.java |  115 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 106 insertions(+), 9 deletions(-)

diff --git a/server/services/src/main/java/com/doumee/core/constants/Constants.java b/server/services/src/main/java/com/doumee/core/constants/Constants.java
index 3f9acf4..8a7dc38 100644
--- a/server/services/src/main/java/com/doumee/core/constants/Constants.java
+++ b/server/services/src/main/java/com/doumee/core/constants/Constants.java
@@ -1,5 +1,6 @@
 package com.doumee.core.constants;
 
+import ch.qos.logback.core.util.COWArrayList;
 import org.apache.commons.codec.binary.Hex;
 import org.apache.commons.lang3.StringUtils;
 
@@ -23,17 +24,33 @@
   public static final String FALSE = "f";
   public static final String TOKEN ="TOKEN" ;
     public static final String SYSTEM ="SYSTEM" ;
+    public static final String DINGDING ="DINGDING" ;
     public static final String MINI_PROGRAMME ="MINI_PROGRAMME" ;
+    public static final String FREE_RENT_TIME ="FREE_RENT_TIME" ;
     public static final String IMG_DIR = "IMG_DIR";
     public static final String FILE_DIR ="FILE_DIR" ;
     public static final String PRIVATE_KEY = "PRIVATE_KEY";
     public static final String PROJECT_FILE = "PROJECT_FILE";
+    public static final String PROJECTS = "PROJECTS";
+    public static final String FORCE_BACK_LOCK = "FORCE_BACK_LOCK";
+    public static final String FORCE_BACK_SITE = "FORCE_BACK_SITE";
+    //杞﹁締绫诲瀷鏁版嵁
+    public static final String  BIKE_TYPE ="1,2,3,4,5,6,7,8" ;
     public static String REDIS_DEBUG_STR="test_";
+    public static final String AD = "AD";
+    public static String REPAIR = "REPAIR";
+
     public  interface MqttTopic{
-        //寮�閿�
-        String openLock = "OPENLOCK";
-        //鍏抽棴閿佸ご
-        String closeLock = "CLOSELOCK";
+
+        String topic_index = "device/lock/";
+        //寮�閿侊紙鍙戝竷锛�
+        String pub_openLock = "device/lock/{siteId}/{lockId}/unlock";
+        //閿佷俊鎭紝鍦ㄥ垵濮嬪寲銆佺姸鎬佸彉鏇存椂浼氭帹閫侀攣鐨勫畬鏁寸姸鎬�(璁㈤槄锛�
+        String sub_lockInfo = "device/lock/+/+/info";
+        //杩樿溅閿佸ご锛堣闃咃級
+        String sub_closeLock = "device/lock/+/+/bike";
+        //瀹炴椂鑾峰彇閿佷俊鎭紙鍙戝竷锛�
+        String pub_getLockInfo = "device/lock/{siteId}/{lockId}/getInfo";
     }
 
     /**
@@ -45,6 +62,13 @@
         int all =2;
         int partful = 3;
   }
+    public interface LockStatus{
+      //  //鐘舵�侊紝0闂悎, 1鎵撳紑锛�2杩愯涓�, 3寮傚父
+        int closed =0;
+        int open =1;
+        int running =2;
+        int error= 3;
+    }
     public interface goodsorderStatus{
         int waitPay =0;
         int pay =1;
@@ -56,13 +80,63 @@
         int waitPay =0;
         int pay =1;
     }
-    public interface transactionsType{
-        int deposit =0;
-        int consumption =1;
+    public enum TRANSACTIONS_TYPE{
+      //浜ゆ槗绫诲瀷 0绉熻溅鎶奸噾 1缁撶畻瀹為檯娑堣垂 2缁撶畻閫�娆� 3骞冲彴閫�娆�"
+        DEPOSIT(0,"绉熻溅鎶奸噾", "绉熻溅鎶奸噾"),
 
-        int refund =2;
-        int platformRefund = 3;
+        CONSUMPTION(1,"缁撶畻瀹為檯娑堣垂", "缁撶畻瀹為檯娑堣垂"),
+
+        REFUND(2,"缁撶畻閫�娆�", "缁撶畻閫�娆�"),
+
+        PLATFORMREFUND(3,"骞冲彴閫�娆�", "骞冲彴閫�娆�")
+
+        ;
+        String name;
+
+        Integer key;
+
+        String info;
+
+        TRANSACTIONS_TYPE(Integer key, String name, String info) {
+            this.name = name;
+            this.key = key;
+            this.info = info;
+        }
+        public static TRANSACTIONS_TYPE get(int key) {
+            TRANSACTIONS_TYPE[] values = TRANSACTIONS_TYPE.values();
+            for (TRANSACTIONS_TYPE object : values) {
+                if (object.key == key) {
+                    return object;
+                }
+            }
+            return null;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public Integer getKey() {
+            return key;
+        }
+
+        public void setKey(Integer key) {
+            this.key = key;
+        }
+
+        public String getInfo() {
+            return info;
+        }
+
+        public void setInfo(String info) {
+            this.info = info;
+        }
     }
+
 
 public static  String getUUID(){
       return UUID.randomUUID().toString().replace("-","");
@@ -108,6 +182,16 @@
         public static final String BUSINESS_STARTTIME = "BUSINESS_STARTTIME";
         //灏忕▼搴忔瘡鏃ユ湇鍔$粨鏉熸椂闂�
         public static final String BUSINESS_ENDTIME = "BUSINESS_ENDTIME";
+
+        //閽夐拤閫氱煡鍦板潃
+        public static final String DINGDING_URL = "DINGDING_URL";
+        //閽夐拤绛惧悕
+        public static final String DINGDING_SECRET = "DINGDING_SECRET";
+
+        //灏忕▼搴忔弧杞介璀�(%)鏈�澶у��
+        public static final String WARN_MAX = "WARN_MAX";
+        //灏忕▼搴忔弧杞介璀�(%)鏈�灏忓��
+        public static final String WARN_MIN = "WARN_MIN";
 
 
         public static final String FILES_DIR = "FILES_DIR";
@@ -259,6 +343,15 @@
             this.info = info;
         }
 
+        public static REFUND_TYPE get(int key) {
+            REFUND_TYPE[] values = REFUND_TYPE.values();
+            for (REFUND_TYPE object : values) {
+                if (object.key == key) {
+                    return object;
+                }
+            }
+            return null;
+        }
         public String getName() {
             return name;
         }
@@ -470,4 +563,8 @@
         }
 
 
+        public static BigDecimal translateMoney(BigDecimal money){
+            return  Constants.formatDecimalNum(money).divide(new BigDecimal(100), 2, BigDecimal.ROUND_UP);
+
+        }
 }

--
Gitblit v1.9.3