|
@@ -401,9 +401,39 @@ function M.zy_match_album_link_by_name(msg_body)
|
|
|
return true, notFindList
|
|
|
end
|
|
|
|
|
|
+function M.modify_product_info(msg_body)
|
|
|
+ local isok ,key = tools.checkData({"gender","list_time","free_time","album_link","fee_mode","episode_price","seq_num","status","book_platform","product_id","product_name"
|
|
|
+ ,"genre","is_store","start_chapter","publish_time"},msg_body)
|
|
|
+ if not isok then
|
|
|
+ return false,string.format("缺少字段: %s.", key)
|
|
|
+ end
|
|
|
+ local sql ;
|
|
|
+ local isok,res;
|
|
|
+
|
|
|
+ sql = string.format("UPDATE `video_product` SET gender = %d, list_time = '%s' ,free_time = '%s',album_link = '%s',fee_mode = %d, episode_price = %d,seq_num= %d,status = %d,book_platform= %d,product_id = '%s',product_name = '%s',genre = %d,is_store = %d,start_chapter = %d,publish_time = '%s' WHERE id = %d ",
|
|
|
+ msg_body.gender,
|
|
|
+ msg_body.list_time,
|
|
|
+ msg_body.free_time,
|
|
|
+ msg_body.album_link,
|
|
|
+ msg_body.fee_mode,
|
|
|
+ msg_body.episode_price,
|
|
|
+ msg_body.seq_num,
|
|
|
+ msg_body.status,
|
|
|
+ msg_body.book_platform,
|
|
|
+ msg_body.product_id,
|
|
|
+ msg_body.product_name,
|
|
|
+ msg_body.genre,
|
|
|
+ msg_body.is_store,
|
|
|
+ msg_body.start_chapter,
|
|
|
+ msg_body.publish_time,
|
|
|
+ msg_body.id)
|
|
|
+ res = mysqldtaskbx.Singleton().query(sql)
|
|
|
+ return true,{}
|
|
|
+end
|
|
|
+
|
|
|
--添加书籍数据
|
|
|
function M.add_book_data(msg_body)
|
|
|
- local isok ,key = tools.checkData({"gender","list_time","free_time","album_link","fee_mode","episode_price","seq_num","status","tg_platform_id","product_id","product_name"
|
|
|
+ local isok ,key = tools.checkData({"gender","list_time","free_time","album_link","fee_mode","episode_price","seq_num","status","book_platform","product_id","product_name"
|
|
|
,"genre","is_store","start_chapter","publish_time"},msg_body)
|
|
|
if not isok then
|
|
|
return false,string.format("缺少字段: %s.", key)
|
|
@@ -426,7 +456,7 @@ function M.add_book_data(msg_body)
|
|
|
msg_body.episode_price,
|
|
|
msg_body.seq_num,
|
|
|
msg_body.status,
|
|
|
- msg_body.tg_platform_id,
|
|
|
+ msg_body.book_platform,
|
|
|
msg_body.product_id,
|
|
|
msg_body.product_name,
|
|
|
msg_body.genre,msg_body.is_store,msg_body.start_chapter,msg_body.publish_time)
|