|
@@ -379,6 +379,7 @@ end
|
|
|
|
|
|
--同步匹配书籍
|
|
|
function M.sync_match_book_id(msg_body)
|
|
|
+ -- ,"is_free"
|
|
|
local isok ,key = tools.checkData({"match_book","product_id"},msg_body)
|
|
|
if not isok then
|
|
|
return false,string.format("缺少字段: %s.", key)
|
|
@@ -389,7 +390,7 @@ function M.sync_match_book_id(msg_body)
|
|
|
if #res<=0 then
|
|
|
return true,{status=0,msg="请先创建对应的匹配书籍:"..msg_body.match_book}
|
|
|
end
|
|
|
- sql = string.format("UPDATE video_product SET match_book = '%s' WHERE product_id = '%s' ",msg_body.match_book,msg_body.product_id)
|
|
|
+ sql = string.format("UPDATE video_product SET match_book = '%s' , product_parent_id = '%s' WHERE product_id = '%s' ",msg_body.match_book,msg_body.match_book,msg_body.product_id)
|
|
|
mysqldtaskbx.Singleton().query(sql)
|
|
|
return true, {}
|
|
|
end
|