|
@@ -115,6 +115,8 @@ end
|
|
|
--product_name 书名
|
|
|
function M.search_book_data(msg_body)
|
|
|
local isok ,key = tools.checkData({
|
|
|
+ "start_create_at",
|
|
|
+ "end_create_at",
|
|
|
"is_top",
|
|
|
"status",
|
|
|
"start_publish_time",
|
|
@@ -136,6 +138,11 @@ function M.search_book_data(msg_body)
|
|
|
local page_number = msg_body.page_number
|
|
|
local offset = (page_number - 1) * page_size
|
|
|
|
|
|
+ local create_date_param = ""
|
|
|
+ if msg_body.start_create_at~="" and msg_body.end_create_at~="" then
|
|
|
+ create_date_param = " AND DATE(create_at) >= DATE(FROM_UNIXTIME(" .. (msg_body.start_create_at / 1000) .. ")) AND DATE(create_at) <= DATE(FROM_UNIXTIME(" .. (msg_body.end_create_at / 1000) .. ")) "
|
|
|
+ end
|
|
|
+
|
|
|
local is_top_param = ""
|
|
|
if msg_body.is_top~="" then
|
|
|
is_top_param = string.format(" AND is_top = %d ",msg_body.is_top)
|
|
@@ -201,7 +208,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 = is_top_param..status_param..date_param..product_param..product_name_param..tg_platform_param..is_auto_param..is_store_param..genre_param..alias_name_param;
|
|
|
+ local param = create_date_param..is_top_param..status_param..date_param..product_param..product_name_param..tg_platform_param..is_auto_param..is_store_param..genre_param..alias_name_param;
|
|
|
|
|
|
|
|
|
local up_down_param = ""
|