|
@@ -15,6 +15,7 @@ local mysqldtaskbx = {}
|
|
|
--product_name 书名
|
|
|
function M.search_book_data(msg_body)
|
|
|
local isok ,key = tools.checkData({
|
|
|
+ "is_match",
|
|
|
"start_create_at",
|
|
|
"end_create_at",
|
|
|
"product_parent_id",
|
|
@@ -41,6 +42,16 @@ function M.search_book_data(msg_body)
|
|
|
local page_number = msg_body.page_number
|
|
|
local offset = (page_number - 1) * page_size
|
|
|
|
|
|
+ local is_match_param = ""
|
|
|
+ if msg_body.is_match~="" then
|
|
|
+ if msg_body.is_match == 1 then
|
|
|
+ is_match_param = string.format(" AND match_book != 'NONE' ")
|
|
|
+ else
|
|
|
+ is_match_param = string.format(" AND match_book='NONE' ")
|
|
|
+ end
|
|
|
+
|
|
|
+ end
|
|
|
+
|
|
|
local product_parent_id_param = ""
|
|
|
if msg_body.product_parent_id~="" then
|
|
|
product_parent_id_param = string.format(" AND product_parent_id = '%s' ",msg_body.product_parent_id)
|
|
@@ -128,7 +139,7 @@ function M.search_book_data(msg_body)
|
|
|
alias_name_param = string.format(" AND ( alias_name LIKE CONCAT( '%%%s%%')) ",msg_body.alias_name)
|
|
|
end
|
|
|
|
|
|
- local param = create_date_param..product_parent_id_param..is_top_param..status_param..date_param..totalChapterNum_param..product_param..product_name_param..tg_platform_param..is_auto_param..is_store_param..genre_param..alias_name_param..word_param;
|
|
|
+ local param = is_match_param..create_date_param..product_parent_id_param..is_top_param..status_param..date_param..totalChapterNum_param..product_param..product_name_param..tg_platform_param..is_auto_param..is_store_param..genre_param..alias_name_param..word_param;
|
|
|
|
|
|
if stat_cost_param~="" and up_or_down_publish_time_param ~="" then
|
|
|
up_or_down_publish_time_param = " , "..up_or_down_publish_time_param
|