Explorar el Código

更新pc_menu.json

zou.yingbin hace 4 años
padre
commit
efdcdd9ab6
Se han modificado 2 ficheros con 42 adiciones y 13 borrados
  1. 35 10
      config/pc_menu.json
  2. 7 3
      db/checkConnection.go

+ 35 - 10
config/pc_menu.json

@@ -472,22 +472,23 @@
               }
             ]
           },
+
           {
-            "code": "commodity_contract_bargain",
-            "title": "议价单",
+            "code": "commodity_contract_commission",
+            "title": "委托",
             "sort": 1,
             "type": 4,
-            "rulekey": "",
+            "rulekey": "client_pc_web_commodity_contract_bottom_commission",
             "isshow": true,
             "url": "",
             "remark": "",
             "children": [
               {
-                "code": "commodity_contract_bargain_cancel_order",
+                "code": "commodity_contract_commission_cancel_order",
                 "title": "撤单",
                 "sort": 1,
                 "type": 2,
-                "rulekey": "",
+                "rulekey": "client_pc_web_commodity_contract_bottom_contract_summary_cancel_order",
                 "isshow": true,
                 "url": "",
                 "remark": "",
@@ -497,21 +498,45 @@
             ]
           },
           {
-            "code": "commodity_contract_commission",
-            "title": "委托",
+            "code": "commodity_contract_bargain",
+            "title": "议价单",
             "sort": 1,
             "type": 4,
-            "rulekey": "client_pc_web_commodity_contract_bottom_commission",
+            "rulekey": "",
             "isshow": true,
             "url": "",
             "remark": "",
             "children": [
               {
-                "code": "commodity_contract_commission_cancel_order",
+                "code": "commodity_contract_bargain_cancel_order",
                 "title": "撤单",
                 "sort": 1,
                 "type": 2,
-                "rulekey": "client_pc_web_commodity_contract_bottom_contract_summary_cancel_order",
+                "rulekey": "",
+                "isshow": true,
+                "url": "",
+                "remark": "",
+                "children": [
+                ]
+              },
+              {
+                "code": "commodity_contract_bargain_submit_order",
+                "title": "同意",
+                "sort": 1,
+                "type": 2,
+                "rulekey": "",
+                "isshow": true,
+                "url": "",
+                "remark": "",
+                "children": [
+                ]
+              },
+              {
+                "code": "commodity_contract_bargain_refuse_order",
+                "title": "拒绝",
+                "sort": 1,
+                "type": 2,
+                "rulekey": "",
                 "isshow": true,
                 "url": "",
                 "remark": "",

+ 7 - 3
db/checkConnection.go

@@ -12,27 +12,31 @@ func StartCheckConnection(dbType int) {
 		return
 	}
 
+	fDelay := func() {
+		time.Sleep(time.Duration(30) * time.Second)
+	}
+
 	switch dbType {
 	case 0: // oracle
 		for {
 			if err := GetEngine().Ping(); err != nil {
 				InitDbEngine()
 			}
-			time.Sleep(time.Duration(5000) * time.Millisecond)
+			fDelay()
 		}
 	case 1: // mysql
 		for {
 			if err := GetMySQLEngine().Ping(); err != nil {
 				InitMySQLDbEngine()
 			}
-			time.Sleep(time.Duration(5000) * time.Millisecond)
+			fDelay()
 		}
 	case 2: // mongodb
 		for {
 			if err := GetMongoDB().Session.Ping(); err != nil {
 				InitMongoDB()
 			}
-			time.Sleep(time.Duration(5000) * time.Millisecond)
+			fDelay()
 		}
 	}
 }