904118851 3 долоо хоног өмнө
parent
commit
efa798b0c9

+ 11 - 1
service/backmgr/video_product.lua

@@ -115,6 +115,7 @@ end
 --product_name 书名
 function M.search_book_data(msg_body)
     local isok ,key =  tools.checkData({
+        "is_album_link",
         "start_create_at",
         "end_create_at",
         "is_top",
@@ -138,6 +139,15 @@ function M.search_book_data(msg_body)
         local page_number = msg_body.page_number
         local offset = (page_number - 1) * page_size
     
+        local is_album_link_param = ""
+        if msg_body.is_album_link~="" then
+            if msg_body.is_album_link == 1 then
+                is_album_link_param = string.format(" ( AND album_link IS NOT NULL  ").."AND album_link!='' ) " 
+            else
+                is_album_link_param = string.format("  ( AND album_link IS NULL ").." OR album_link=''  ) "
+            end
+        end
+
         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) .. ")) "
@@ -208,7 +218,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..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 = is_album_link_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 = ""