904118851 8 months ago
parent
commit
b6d727b3de

+ 11 - 1
common/dbproxy/tg_main.lua

@@ -18,6 +18,16 @@ function M.getOpenMainList()
     end
     return true, res
 end
+
+function M.getCloseMainList()
+    local sql = string.format("select * from `tg_main` where running_status = 0 ")
+    local isok,res;
+    res = mysqldbx.query(sql)
+    if #res <= 0 then
+        return true , {}
+    end
+    return true, res
+end
 --page_size  是你想要在每页中显示的记录数。
 --page_number 页数
 --获取所有主体
@@ -90,7 +100,7 @@ function syncMainAppletProduct(main_info)
     --         table.insert(need_create_link_list,#need_create_link_list+1,{product_name=product.product_name,product_id=product.product_id,book_platform=product.book_platform})
     --     end
     -- end
-    skynet.send("backmgr","lua","on_recv",nil,"ws_push_msg",cjson.encode({cmd="syncMain",data={ain_info=main_info}}))
+    skynet.send("backmgr","lua","on_recv",nil,"ws_push_msg",cjson.encode({cmd="syncMain",data={main_info=main_info}}))
 end
 
 function pushAddMainMsg(msg_body)

+ 1 - 14
service/backmgr/filter_task.lua

@@ -117,20 +117,7 @@ function M.set_app_book_status(msg_body)
     return true,{}
 end
 
---开启小程序书籍任务
-function M.open_app_book_task(msg_body)
-    local isok ,key =  tools.checkData({"id_list"},msg_body)
-    if not isok then
-        return false,string.format("缺少字段: %s.", key)
-    end
-    for i = 1, #msg_body.id_list, 1 do
-        local res,sql,id;
-        id = msg_body.id_list[i]
-        sql = string.format("UPDATE  video_applet_product SET status = 0 ,  wait_status = 0 WHERE id = %d ",id)
-        res = mysqldtaskbx.Singleton().query(sql)
-    end
-    return true,{}
-end
+
 
 --获取推广数据总数
 function M.get_tui_guang_total()

+ 14 - 0
service/backmgr/video_applet_product.lua

@@ -19,6 +19,20 @@ function M.add_applet_product(msg_body)
     return true, {}
 end
 
+--开启小程序书籍任务
+function M.open_app_book_task(msg_body)
+    local isok ,key =  tools.checkData({"id_list"},msg_body)
+    if not isok then
+        return false,string.format("缺少字段: %s.", key)
+    end
+    for i = 1, #msg_body.id_list, 1 do
+        local res,sql,id;
+        id = msg_body.id_list[i]
+        sql = string.format("UPDATE  video_applet_product SET status = 0 ,  wait_status = 0 ,is_close_execution = 1  WHERE id = %d ",id)
+        res = mysqldtaskbx.Singleton().query(sql)
+    end
+    return true,{}
+end
 function mysqldtaskbx.start()
     local function on_connect(db)
         db:query("set charset utf8mb4");