|
@@ -20,14 +20,15 @@ function M.delete_origin_video_titles(msg_body)
|
|
|
end
|
|
|
|
|
|
function M.publish_origin_video_titles(msg_body)
|
|
|
- local isok ,key = tools.checkData({"title_list"},msg_body)
|
|
|
+ local isok ,key = tools.checkData({"title_list","pay_type","title_type_id"},msg_body)
|
|
|
if not isok then
|
|
|
return false,string.format("缺少字段: %s.", key)
|
|
|
end
|
|
|
-
|
|
|
+ local pay_type = msg_body.pay_type
|
|
|
+ local title_type_id = msg_body.title_type_id
|
|
|
for i = 1, #msg_body.title_list, 1 do
|
|
|
local title_tab = msg_body.title_list[i]
|
|
|
- local sql = string.format("INSERT INTO `video_titles` (title,md5_tag) VALUES ('%s','%s')",title_tab.title,title_tab.md5_tag)
|
|
|
+ local sql = string.format("INSERT INTO `video_titles` (title,md5_tag) VALUES ('%s','%s' ,%d,%d)",title_tab.title,title_tab.md5_tag,pay_type,title_type_id)
|
|
|
mysqldbx.query(sql)
|
|
|
sql = string.format("DELETE FROM origin_video_titles WHERE id = %d ",title_tab.id)
|
|
|
mysqldbx.query(sql)
|