|
@@ -34,11 +34,12 @@ end
|
|
|
|
|
|
--修改平台
|
|
--修改平台
|
|
function M.modifyPlatform(msg_body)
|
|
function M.modifyPlatform(msg_body)
|
|
- local isok ,key = tools.checkData({"tg_platform_name","id"},msg_body)
|
|
|
|
|
|
+ local isok ,key = tools.checkData({"tg_platform_name","id","filter_guajian_logic"},msg_body)
|
|
if not isok then
|
|
if not isok then
|
|
return false,string.format("缺少字段: %s.", key)
|
|
return false,string.format("缺少字段: %s.", key)
|
|
end
|
|
end
|
|
- local sql = string.format("UPDATE `tg_platform` SET tg_platform_name = '%s' WHERE id = %d ",
|
|
|
|
|
|
+ local sql = string.format("UPDATE `tg_platform` SET filter_guajian_logic = '%s' , tg_platform_name = '%s' WHERE id = %d ",
|
|
|
|
+ msg_body.filter_guajian_logic,
|
|
msg_body.tg_platform_name,msg_body.id)
|
|
msg_body.tg_platform_name,msg_body.id)
|
|
mysqldbx.query(sql)
|
|
mysqldbx.query(sql)
|
|
skynet.send("backmgr","lua","on_recv",nil,"ws_push_msg",cjson.encode({cmd="updatePlatformConfig"}))
|
|
skynet.send("backmgr","lua","on_recv",nil,"ws_push_msg",cjson.encode({cmd="updatePlatformConfig"}))
|
|
@@ -277,6 +278,16 @@ function M.modifyMiniProgramPlatform(msg_body)
|
|
return true,obj
|
|
return true,obj
|
|
end
|
|
end
|
|
|
|
|
|
|
|
+function M.set_filter_guajian_logic(msg_body)
|
|
|
|
+ local isok ,key = tools.checkData({"id","filter_guajian_logic"},msg_body)
|
|
|
|
+ if not isok then
|
|
|
|
+ return false,string.format("缺少字段: %s.", key)
|
|
|
|
+ end
|
|
|
|
+ local sql = string.format("UPDATE `tg_platform` SET filter_guajian_logic = '%s' WHERE id = %d ",msg_body.filter_guajian_logic,msg_body.id)
|
|
|
|
+ mysqldbx.query(sql)
|
|
|
|
+ return true,{}
|
|
|
|
+end
|
|
|
|
+
|
|
function M.getTotal()
|
|
function M.getTotal()
|
|
local sql = "SELECT COUNT(*) AS total FROM tg_platform"
|
|
local sql = "SELECT COUNT(*) AS total FROM tg_platform"
|
|
local res = mysqldbx.query(sql)
|
|
local res = mysqldbx.query(sql)
|