|
@@ -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)
|