|
@@ -294,10 +294,9 @@ function M.search_bao_liang_data(msg_body)
|
|
|
end
|
|
|
|
|
|
|
|
|
-
|
|
|
--添加书籍数据
|
|
|
function M.add_book_data(msg_body)
|
|
|
- local isok ,key = tools.checkData({"publish_time","status","product_parent_id","tg_platform_id","product_id","product_name"
|
|
|
+ local isok ,key = tools.checkData({"fee_unit","default_price","default_pay_section","publish_time","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 +310,10 @@ function M.add_book_data(msg_body)
|
|
|
return false,"书籍已存在!"
|
|
|
end
|
|
|
|
|
|
- sql = string.format("INSERT INTO `video_product` (publish_time,status,product_parent_id,book_platform,product_id, product_name, genre,is_store,is_auto) VALUES ('%s',%d,'%s',%d,'%s','%s',%d,%d,0)",
|
|
|
+ sql = string.format("INSERT INTO `video_product` (fee_unit,default_price,default_pay_section,publish_time,status,product_parent_id,book_platform,product_id, product_name, genre,is_store,is_auto) VALUES (%d,%f,%d,'%s',%d,'%s',%d,'%s','%s',%d,%d,0)",
|
|
|
+ msg_body.fee_unit,
|
|
|
+ msg_body.default_price,
|
|
|
+ msg_body.default_pay_section,
|
|
|
msg_body.publish_time,
|
|
|
msg_body.status,
|
|
|
msg_body.product_parent_id,
|
|
@@ -324,7 +326,6 @@ function M.add_book_data(msg_body)
|
|
|
return true,{}
|
|
|
end
|
|
|
|
|
|
-
|
|
|
--发送书籍数据到主体
|
|
|
function M.send_book_data(msg_body)
|
|
|
local isok ,key = tools.checkData({"tg_platform_id","app_id","id_list","main_id"},msg_body)
|