904118851 3 недель назад
Родитель
Сommit
ee74ff8b99
2 измененных файлов с 28 добавлено и 16 удалено
  1. 7 1
      service/backmgr/video_material.lua
  2. 21 15
      service/backmgr/video_product.lua

+ 7 - 1
service/backmgr/video_material.lua

@@ -57,6 +57,7 @@ end
 --sync_status 状态
 function M.search(msg_body)
     local isok ,key =  tools.checkData({
+    "material_platform",
     "bl_status",
     "start_publish_time",
     "end_publish_time",
@@ -89,6 +90,11 @@ function M.search(msg_body)
     local page_number = msg_body.page_number
     local offset = (page_number - 1) * page_size
 
+    local material_platform_param = ""
+    if msg_body.material_platform~="" then
+        material_platform_param = string.format(" AND material_platform = %d ",tonumber(msg_body.material_platform)) 
+    end
+
     local bl_status_param = ""
     if msg_body.bl_status~="" then
         bl_status_param = string.format(" AND bl_status = %d ",tonumber(msg_body.bl_status)) 
@@ -311,7 +317,7 @@ function M.search(msg_body)
 
     local new_param = stat_cost_param..show_cnt_param..click_cnt_param..convert_cnt_param..cvr_param..ctr_param
     -----
-    local param = bl_status_param..publish_time_param..yun_fabu_time_param..opt_time_param..exe_review_person_id_param..word_param..genre_param..date_param..product_param..oce_material_id_list_param..status_param..tg_platform_param..sync_status_param..product_name_param..is_auto_param..material_id_param..signature_param..dy_id_1_param..artificial_status_param..machine_review_status_param..is_sexual_inducement_content_param..is_bad_value_view_param..user_id_param
+    local param = material_platform_param..bl_status_param..publish_time_param..yun_fabu_time_param..opt_time_param..exe_review_person_id_param..word_param..genre_param..date_param..product_param..oce_material_id_list_param..status_param..tg_platform_param..sync_status_param..product_name_param..is_auto_param..material_id_param..signature_param..dy_id_1_param..artificial_status_param..machine_review_status_param..is_sexual_inducement_content_param..is_bad_value_view_param..user_id_param
 
     local up_down_param = d_z_param..comment_param..forward_param..collect_param..new_param
 

+ 21 - 15
service/backmgr/video_product.lua

@@ -398,6 +398,11 @@ function M.add_book_data(msg_body)
     if msg_body.match_book~=nil then
         match_book = msg_body.match_book
     end
+
+    local totalChapterNum = 0
+    if msg_body.totalChapterNum~=nil then
+        totalChapterNum = msg_body.totalChapterNum
+    end
     local sql ;
     local isok,res;
     local sql = string.format("SELECT id FROM video_product where product_id = '%s'  LIMIT 1 ",msg_body.product_id)
@@ -407,21 +412,22 @@ function M.add_book_data(msg_body)
         return false,"书籍已存在!"
     end
 
-    sql = string.format("INSERT INTO `video_product` (match_book,words,author,album_link,fee_unit,default_price,default_pay_section,publish_time,status,product_parent_id,book_platform,product_id, product_name, genre,is_store,is_auto)  VALUES ('%s','%s','%s','%s',%d,%f,%d,'%s',%d,'%s',%d,'%s','%s',%d,%d,0)",
-    match_book,
-    msg_body.words,
-    msg_body.author,
-    album_link,
-    msg_body.fee_unit,
-    msg_body.default_price,
-    msg_body.default_pay_section,
-    msg_body.publish_time,
-    msg_body.status,
-    msg_body.product_parent_id,
-    msg_body.tg_platform_id,
-    msg_body.product_id,
-    msg_body.product_name,
-    msg_body.genre,msg_body.is_store)
+    sql = string.format("INSERT INTO `video_product` (totalChapterNum,match_book,words,author,album_link,fee_unit,default_price,default_pay_section,publish_time,status,product_parent_id,book_platform,product_id, product_name, genre,is_store,is_auto)  VALUES (%d,'%s','%s','%s','%s',%d,%f,%d,'%s',%d,'%s',%d,'%s','%s',%d,%d,0)",
+        totalChapterNum,
+        match_book,
+        msg_body.words,
+        msg_body.author,
+        album_link,
+        msg_body.fee_unit,
+        msg_body.default_price,
+        msg_body.default_pay_section,
+        msg_body.publish_time,
+        msg_body.status,
+        msg_body.product_parent_id,
+        msg_body.tg_platform_id,
+        msg_body.product_id,
+        msg_body.product_name,
+        msg_body.genre,msg_body.is_store)
 
     res = mysqldtaskbx.Singleton().query(sql)
     return true,{}