|
@@ -298,7 +298,7 @@ end
|
|
|
--添加书籍数据
|
|
|
function M.add_book_data(msg_body)
|
|
|
local isok ,key = tools.checkData({"tg_platform_id","product_id","product_name"
|
|
|
- ,"genre","is_store","start_chapter"},msg_body)
|
|
|
+ ,"genre","is_store","start_chapter","publish_time"},msg_body)
|
|
|
if not isok then
|
|
|
return false,string.format("缺少字段: %s.", key)
|
|
|
end
|
|
@@ -311,11 +311,11 @@ function M.add_book_data(msg_body)
|
|
|
return false,"书籍已存在!"
|
|
|
end
|
|
|
|
|
|
- sql = string.format("INSERT INTO `video_product` (book_platform,product_id, product_name, genre,is_store,is_auto,start_chapter) VALUES (%d,'%s','%s',%d,%d,0,%d)",
|
|
|
+ sql = string.format("INSERT INTO `video_product` (book_platform,product_id, product_name, genre,is_store,is_auto,start_chapter,publish_time) VALUES (%d,'%s','%s',%d,%d,0,%d,'%s')",
|
|
|
msg_body.tg_platform_id,
|
|
|
msg_body.product_id,
|
|
|
msg_body.product_name,
|
|
|
- msg_body.genre,msg_body.is_store,msg_body.start_chapter)
|
|
|
+ msg_body.genre,msg_body.is_store,msg_body.start_chapter,msg_body.publish_time)
|
|
|
|
|
|
res = mysqldtaskbx.Singleton().query(sql)
|
|
|
return true,{}
|