904118851 4 сар өмнө
parent
commit
d620386a62

+ 3 - 2
service/backmgr/filter_task.lua

@@ -337,12 +337,13 @@ function M.send_book_data(msg_body)
     for i = 1, #res, 1 do
         local product_id =   res[i].product_id
         local product_name = res[i].product_name
+        local product_parent_id = res[i].product_parent_id
         local sql = string.format("SELECT * FROM video_applet_product where product_id = '%s' and book_platform  = %d and dy_small_applet_app_id = '%s' and main_id = %d ",product_id,msg_body.tg_platform_id,msg_body.app_id,msg_body.main_id)
         local result = mysqldtaskbx.Singleton().query(sql)
         if #result<=0 then 
             local butler_info = mysqldbx.query( "SELECT  butler_id  FROM tg_main WHERE id = "..msg_body.main_id.." LIMIT 1")
-            sql = string.format("INSERT INTO `video_applet_product` (product_id,product_name,book_platform,dy_small_applet_app_id,main_id,wait_status,status,butler_id)  VALUES ('%s','%s',%d,'%s',%d,%d,%d,%d)",
-            product_id,product_name,msg_body.tg_platform_id,msg_body.app_id,msg_body.main_id,0,0, butler_info[1].butler_id)
+            sql = string.format("INSERT INTO `video_applet_product` (product_id,product_name,book_platform,dy_small_applet_app_id,main_id,wait_status,status,butler_id,product_parent_id)  VALUES ('%s','%s',%d,'%s',%d,%d,%d,%d,'%s')",
+            product_id,product_name,msg_body.tg_platform_id,msg_body.app_id,msg_body.main_id,0,0, butler_info[1].butler_id,product_parent_id)
             mysqldtaskbx.Singleton().query(sql)
             skynet.error("sql:",sql)
         end