904118851 3 mesi fa
parent
commit
4a5661d998
1 ha cambiato i file con 7 aggiunte e 1 eliminazioni
  1. 7 1
      service/backmgr/video_product.lua

+ 7 - 1
service/backmgr/video_product.lua

@@ -15,6 +15,7 @@ local mysqldtaskbx = {}
 --product_name 书名
 function M.search_book_data(msg_body)
     local isok ,key =  tools.checkData({
+    "product_parent_id",
     "is_top",
     "status",
     "start_publish_time",
@@ -38,6 +39,11 @@ function M.search_book_data(msg_body)
     local page_number = msg_body.page_number
     local offset = (page_number - 1) * page_size
 
+    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)
+    end
+
     local is_top_param = ""
     if msg_body.is_top~="" then
         is_top_param = string.format(" AND is_top = %d ",msg_body.is_top)
@@ -115,7 +121,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..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 = 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