qingyan 1 天之前
父節點
當前提交
8cbb5c4228
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      service/backmgr/video_product.lua

+ 2 - 2
service/backmgr/video_product.lua

@@ -378,7 +378,7 @@ end
 
 --掌阅匹配专辑链接
 function M.zy_match_album_link_by_name(msg_body)
-    local isok ,key =  tools.checkData({"list"},msg_body)
+    local isok ,key =  tools.checkData({"list","book_platform"},msg_body)
     if not isok then
         return false,string.format("缺少字段: %s.", key)
     end
@@ -389,7 +389,7 @@ function M.zy_match_album_link_by_name(msg_body)
         local item = msg_body.list[i]
         local name = item.name
         local album_link = item.album_link
-        sql = string.format("SELECT * FROM video_product where product_name = '%s' AND book_platform = 7  LIMIT 1 ",name)
+        sql = string.format("SELECT * FROM video_product where product_name = '%s' AND book_platform = %d  LIMIT 1 ",name,msg_body.book_platform)
         res = mysqldtaskbx.Singleton().query(sql)
         if #res>0 then
             sql = string.format("UPDATE  video_product SET album_link = '%s' WHERE id = %d ",album_link,res[1].id)