Browse Source

2024/01/29 添加身份校验

wk 1 year ago
parent
commit
0717a35fd3

+ 2 - 0
message.proto

@@ -119,8 +119,10 @@ message apply_table
 {
     string car_number=1;                        //车牌号
     string apply_end_time=2;                   //预约结束时间
+    int32 operation_type=3;                     //操作类型, 0:新增预约  1:取消预约
 }
 
+
 /*
 取车表单
  */

+ 1 - 1
指令检查节点/check_command_XmSgj.py

@@ -581,12 +581,12 @@ class CommandChecker:
                 res = self.db.query_queue_condition_in_unit(unit)
                 for dict in res:
                     if dict['upload_statu'] is None and dict['row_number() over(order by queue_time)'] == 2:
-                        print("\n")
                         print("===============================排队为1 推送排队详情=========================" + str(datetime.datetime.now()))
                         headers_dict, park_surplus_dict, pickup_queue_dict, phone_out_dict = self.get_phone_request_data(
                             dict['car_number'], dict['primary_key'], dict['unit'], 'queue 1')
                         self.push_http_request(self._queue_url, pickup_queue_dict, headers_dict)
                         self.db.update_command_queue_upload_statu_in_car_number(dict['car_number'])
+                        print("\n")
             time.sleep(1)
 
     def get_unit_str(self, unit):

+ 1 - 0
指令检查节点/node.py

@@ -209,6 +209,7 @@ class MyHttpRequestHandler(BaseHTTPRequestHandler):
                     apply_table = message.apply_table()
                     apply_table.car_number = res['licenesePlate']
                     apply_table.apply_end_time = res['endTime']
+                    apply_table.operation_type = res['operationType']
 
                 except Exception:
                     code, msg, data = -20, "error", "ApplyCommand,解析失败,缺少关键字段!"

+ 5 - 5
管理节点/config.json

@@ -2,24 +2,24 @@
              //  数据库配置
               "db_config": {
                 //数据库IP地址
-                "db_ip": "10.211.11.201",
+                "db_ip": "127.0.0.1",
                 // 端口号
                 "db_port": 3306,
                 // 数据库名
-                "db_name": "gy_project",
+                "db_name": "xm_project",
                 // 用户名
-                "db_user": "zx",
+                "db_user": "root",
                 // 用户密码
                 "db_password": "123456"
               },
               //  rabbitmq配置
               "mq_config": {
                 // rabbitmq服务器ip地址
-                "mq_ip": "10.211.11.201",
+                "mq_ip": "127.0.0.1",
                 // 端口
                 "mq_port": "5672",
                 // 用户名
-                "mq_user": "zx",
+                "mq_user": "wk",
                 // 用户密码
                 "mq_password": "123456",
                 //态交换机需要订阅的端口列表  厦门的