|
@@ -297,7 +297,7 @@ end
|
|
|
|
|
|
--添加书籍数据
|
|
|
function M.add_book_data(msg_body)
|
|
|
- local isok ,key = tools.checkData({"tg_platform_id","product_id","product_name"
|
|
|
+ local isok ,key = tools.checkData({"status","tg_platform_id","product_id","product_name"
|
|
|
,"genre","is_store","start_chapter","publish_time"},msg_body)
|
|
|
if not isok then
|
|
|
return false,string.format("缺少字段: %s.", key)
|
|
@@ -311,7 +311,8 @@ 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,publish_time) VALUES (%d,'%s','%s',%d,%d,0,%d,'%s')",
|
|
|
+ sql = string.format("INSERT INTO `video_product` (status,book_platform,product_id, product_name, genre,is_store,is_auto,start_chapter,publish_time) VALUES (%d,%d,'%s','%s',%d,%d,0,%d,'%s')",
|
|
|
+ msg_body.status,
|
|
|
msg_body.tg_platform_id,
|
|
|
msg_body.product_id,
|
|
|
msg_body.product_name,
|