|
@@ -69,28 +69,28 @@ function M.syncMain(msg_body)
|
|
|
end
|
|
|
|
|
|
function syncMainAppletProduct(main_info)
|
|
|
- local tg_platform_id = main_info.tg_platform_id
|
|
|
- local app_id = main_info.app_id
|
|
|
- local sql = string.format("SELECT * FROM video_product where book_platform = %d ",tg_platform_id)
|
|
|
- local video_product_list = mysqldtaskbx.Singleton().query(sql)
|
|
|
+ -- local tg_platform_id = main_info.tg_platform_id
|
|
|
+ -- local app_id = main_info.app_id
|
|
|
+ -- local sql = string.format("SELECT * FROM video_product where book_platform = %d ",tg_platform_id)
|
|
|
+ -- local video_product_list = mysqldtaskbx.Singleton().query(sql)
|
|
|
|
|
|
|
|
|
- function isHaveAppletProdut(product_id)
|
|
|
- local s = string.format("SELECT * FROM video_applet_product where dy_small_applet_app_id = '%s' and product_id = '%s' and main_id = %d and book_platform = %d LIMIT 1",app_id,product_id,main_info.id,tg_platform_id)
|
|
|
- local r = mysqldtaskbx.Singleton().query(sql)
|
|
|
- return #r>0
|
|
|
- end
|
|
|
+ -- function isHaveAppletProdut(product_id)
|
|
|
+ -- local s = string.format("SELECT * FROM video_applet_product where dy_small_applet_app_id = '%s' and product_id = '%s' and main_id = %d and book_platform = %d LIMIT 1",app_id,product_id,main_info.id,tg_platform_id)
|
|
|
+ -- local r = mysqldtaskbx.Singleton().query(sql)
|
|
|
+ -- return #r>0
|
|
|
+ -- end
|
|
|
|
|
|
- local need_create_link_list = {}
|
|
|
- local verify_list = {}
|
|
|
- for i = 1, #video_product_list, 1 do
|
|
|
- local product = video_product_list[i]
|
|
|
- if not isHaveAppletProdut(product.product_id) and not verify_list[product.product_id] then
|
|
|
- verify_list[product.product_id] = true
|
|
|
- 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={list=need_create_link_list,main_info=main_info}}))
|
|
|
+ -- local need_create_link_list = {}
|
|
|
+ -- local verify_list = {}
|
|
|
+ -- for i = 1, #video_product_list, 1 do
|
|
|
+ -- local product = video_product_list[i]
|
|
|
+ -- if not isHaveAppletProdut(product.product_id) and not verify_list[product.product_id] then
|
|
|
+ -- verify_list[product.product_id] = true
|
|
|
+ -- 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}}))
|
|
|
end
|
|
|
|
|
|
function pushAddMainMsg(msg_body)
|