|
@@ -214,7 +214,7 @@ function M.search_tg_data(msg_body)
|
|
"page_size",
|
|
"page_size",
|
|
"page_number",
|
|
"page_number",
|
|
"dy_id",
|
|
"dy_id",
|
|
-"d_z","comment","collect","forward"},msg_body)
|
|
|
|
|
|
+"d_z","comment","collect","forward","status"},msg_body)
|
|
if not isok then
|
|
if not isok then
|
|
return false,string.format("缺少字段: %s.", key)
|
|
return false,string.format("缺少字段: %s.", key)
|
|
end
|
|
end
|
|
@@ -310,6 +310,18 @@ function M.search_tg_data(msg_body)
|
|
end
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
+ local status_param = ""
|
|
|
|
+
|
|
|
|
+ if msg_body.status~="" then
|
|
|
|
+ if isFirst == true then
|
|
|
|
+ status_param = "AND status = "..msg_body.status.." "
|
|
|
|
+ else
|
|
|
|
+ isFirst = true
|
|
|
|
+ status_param = " status = "..msg_body.status.." "
|
|
|
|
+ end
|
|
|
|
+ end
|
|
|
|
+
|
|
|
|
+
|
|
local d_z_param = ""
|
|
local d_z_param = ""
|
|
if msg_body.d_z~="" then
|
|
if msg_body.d_z~="" then
|
|
if(msg_body.d_z == 0) then
|
|
if(msg_body.d_z == 0) then
|
|
@@ -346,7 +358,7 @@ function M.search_tg_data(msg_body)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
|
|
- local param = date_param..product_param..oce_material_param..tg_platform_param..sync_status_param..product_name_param..is_auto_param..material_id_param
|
|
|
|
|
|
+ local param = date_param..product_param..oce_material_param..status_param..tg_platform_param..sync_status_param..product_name_param..is_auto_param..material_id_param
|
|
|
|
|
|
if param ~= "" then
|
|
if param ~= "" then
|
|
param = " WHERE "..param
|
|
param = " WHERE "..param
|
|
@@ -360,6 +372,8 @@ function M.search_tg_data(msg_body)
|
|
up_down_param = " ORDER BY id DESC "
|
|
up_down_param = " ORDER BY id DESC "
|
|
end
|
|
end
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
local sql = "SELECT * FROM video_material "..param..up_down_param..string.format(" LIMIT %d OFFSET %d ",page_size, offset)
|
|
local sql = "SELECT * FROM video_material "..param..up_down_param..string.format(" LIMIT %d OFFSET %d ",page_size, offset)
|
|
|
|
|
|
local res = mysqldbx.query(sql)
|
|
local res = mysqldbx.query(sql)
|
|
@@ -534,7 +548,29 @@ function M.search_book_data(msg_body)
|
|
|
|
|
|
end
|
|
end
|
|
|
|
|
|
- local param = is_auto_param..product_param..product_name_param..tg_platform_param;
|
|
|
|
|
|
+ local is_store_param = ""
|
|
|
|
+ if msg_body.is_store~="" then
|
|
|
|
+ if isFirst==true then
|
|
|
|
+ is_store_param = "AND is_store = "..msg_body.is_store.." "
|
|
|
|
+ else
|
|
|
|
+ isFirst = true;
|
|
|
|
+ is_store_param = " is_store = "..msg_body.is_store.." "
|
|
|
|
+ end
|
|
|
|
+
|
|
|
|
+ end
|
|
|
|
+
|
|
|
|
+ local genre_param = ""
|
|
|
|
+ if msg_body.genre~="" then
|
|
|
|
+ if isFirst==true then
|
|
|
|
+ genre_param = "AND genre = "..msg_body.genre.." "
|
|
|
|
+ else
|
|
|
|
+ isFirst = true;
|
|
|
|
+ genre_param = " genre = "..msg_body.genre.." "
|
|
|
|
+ end
|
|
|
|
+
|
|
|
|
+ end
|
|
|
|
+
|
|
|
|
+ local param = is_auto_param..product_param..product_name_param..tg_platform_param..is_store_param..genre_param;
|
|
|
|
|
|
if param ~= "" then
|
|
if param ~= "" then
|
|
param = " WHERE "..param
|
|
param = " WHERE "..param
|