Skip to content

Commit

Permalink
同步代码
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaobangyu committed Oct 8, 2023
1 parent 3b5d5e3 commit 7c92860
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions server/robot/accord_mgr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 = "数据格式不正确!" }
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 7c92860

Please sign in to comment.