904118851 4 сар өмнө
parent
commit
75cb202e20

+ 9 - 2
service/backmgr/video_product.lua

@@ -25,7 +25,7 @@ function M.search_book_data(msg_body)
     "page_size",
     "page_number",
     "is_auto",
-    "stat_cost"},msg_body)
+    "stat_cost","min_totalChapterNum","max_totalChapterNum"},msg_body)
     if not isok then
         return false,string.format("缺少字段: %s.", key)
     end
@@ -46,10 +46,17 @@ function M.search_book_data(msg_body)
         end
     end
 
+    local totalChapterNum_param = ""
+    if msg_body.min_totalChapterNum~="" and msg_body.max_totalChapterNum~="" then
+        totalChapterNum_param =  string.format(" AND totalChapterNum >= %d  AND totalChapterNum <= %d ",msg_body.min_totalChapterNum,msg_body.max_totalChapterNum)
+    end
+
+
     local product_param = ""
     if msg_body.product_id~="" then
         product_param = string.format(" AND product_id = '%s' ",msg_body.product_id)
     end
+
     local product_name_param = ""
     if msg_body.product_name~="" then
         product_name_param = string.format(" AND  ( product_name LIKE CONCAT( '%%%s%%')) ",msg_body.product_name)
@@ -78,7 +85,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 = product_param..product_name_param..tg_platform_param..is_auto_param..is_store_param..genre_param..alias_name_param..word_param;
+    local 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 up_down_param = stat_cost_param