|
@@ -356,6 +356,24 @@ function M.get_main_ad_run_number(msg_body)
|
|
return true,{all_run_number=all_run_number,max=max}
|
|
return true,{all_run_number=all_run_number,max=max}
|
|
end
|
|
end
|
|
|
|
|
|
|
|
+
|
|
|
|
+function M.search_info_by_id(msg_body)
|
|
|
|
+ local isok ,key = tools.checkData({"query_list"},msg_body)
|
|
|
|
+ if not isok then
|
|
|
|
+ return false,string.format("缺少字段: %s.", key)
|
|
|
|
+ end
|
|
|
|
+ local temp = {}
|
|
|
|
+ for i = 1, #msg_body.query_list, 1 do
|
|
|
|
+ local main_id = msg_body.query_list[i]
|
|
|
|
+ local sql = string.format("SELECT * FROM tg_main WHERE id = %d LIMIT 1",main_id)
|
|
|
|
+ local res = mysqldbx.query(sql)
|
|
|
|
+ if #res >0 then
|
|
|
|
+ table.insert(temp,#temp+1,res[1])
|
|
|
|
+ end
|
|
|
|
+ end
|
|
|
|
+ return true,temp
|
|
|
|
+end
|
|
|
|
+
|
|
function mysqldtaskbx.start()
|
|
function mysqldtaskbx.start()
|
|
local function on_connect(db)
|
|
local function on_connect(db)
|
|
db:query("set charset utf8mb4");
|
|
db:query("set charset utf8mb4");
|