From 7c928604eb056902981cbd31180781ed595b0262 Mon Sep 17 00:00:00 2001 From: zhaobangyu <763098346@QQ.com> Date: Sun, 8 Oct 2023 10:10:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/robot/accord_mgr.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/robot/accord_mgr.lua b/server/robot/accord_mgr.lua index 13132c7a..46c8bb20 100644 --- a/server/robot/accord_mgr.lua +++ b/server/robot/accord_mgr.lua @@ -180,7 +180,7 @@ function AccordMgr:on_case_group_edit(url, body) log_debug("[AccordMgr][on_case_group_edit] body:{}", body) if body.data then local data = body.data.case_group - local id = tonumber(data.id) + local id = data.id if self.case_group[id] then accord_dao:update("case_group", data) else @@ -197,7 +197,7 @@ function AccordMgr:on_case_group_del(url, body) log_debug("[AccordMgr][on_case_group_del] body:{}", body) if body.data then local data = body.data - local id = tonumber(data.id) + local id = data.id local group = self.case_group[id] if not group then return { code = 0 } @@ -225,7 +225,7 @@ function AccordMgr:on_accord_edit(url, body) log_debug("[AccordMgr][on_accord_edit] body:{}", body) if body.data then local data = body.data - local id = tonumber(data.id) + local id = data.id local new = false local accord = self.accord_list[id] if not accord then @@ -261,8 +261,8 @@ function AccordMgr:on_accord_del(url, body) log_debug("[AccordMgr][on_accord_del] body:{}", body) if body.data then local data = body.data - self.accord_list[tonumber(data.id)] = nil - accord_dao:delete("accord_conf", tonumber(data.id)) + self.accord_list[data.id] = nil + accord_dao:delete("accord_conf", data.id) return { code = 0 } end return { code = -1, msg = "数据格式不正确!" } @@ -273,7 +273,7 @@ function AccordMgr:on_proto_edit(url, body) log_debug("[AccordMgr][on_proto_edit] body:{}", body) if body and body.data then local data = body.data - local accord = self.accord_list[tonumber(data.id)] + local accord = self.accord_list[data.id] if not accord then return { code = -1, msg = "不存在的协议配置,请重新创建!" } end @@ -293,7 +293,7 @@ function AccordMgr:on_proto_del(url, body) log_debug("[AccordMgr][on_proto_del] body:{}", body) if body.data then local data = body.data - local accord = self.accord_list[tonumber(data.id)] + local accord = self.accord_list[data.id] if not accord then return { code = -1, msg = "不存在的协议配置!" } end