|
@@ -297,7 +297,7 @@ end
|
|
|
|
|
|
--添加书籍数据
|
|
|
function M.add_book_data(msg_body)
|
|
|
- local isok ,key = tools.checkData({"product_parent_id","tg_platform_id","product_id","product_name"
|
|
|
+ local isok ,key = tools.checkData({"status","product_parent_id","tg_platform_id","product_id","product_name"
|
|
|
,"genre","is_store"},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` (product_parent_id,book_platform,product_id, product_name, genre,is_store,is_auto) VALUES ('%s',%d,'%s','%s',%d,%d,0)",
|
|
|
+ sql = string.format("INSERT INTO `video_product` (status,product_parent_id,book_platform,product_id, product_name, genre,is_store,is_auto) VALUES (%d,'%s',%d,'%s','%s',%d,%d,0)",
|
|
|
+ msg_body.status,
|
|
|
msg_body.product_parent_id,
|
|
|
msg_body.tg_platform_id,
|
|
|
msg_body.product_id,
|