|
@@ -353,6 +353,18 @@ function M.set_fee_unit(msg_body)
|
|
|
return true, {}
|
|
|
end
|
|
|
|
|
|
+--设置上架时间
|
|
|
+function M.set_list_time(msg_body)
|
|
|
+ local isok ,key = tools.checkData({"list_time","id_list"},msg_body)
|
|
|
+ if not isok then
|
|
|
+ return false,string.format("缺少字段: %s.", key)
|
|
|
+ end
|
|
|
+ local idString = table.concat(msg_body.id_list, ",")
|
|
|
+ local sql = string.format("UPDATE video_product SET list_time = '%s' WHERE id IN (%s) ",msg_body.list_time,idString)
|
|
|
+ mysqldtaskbx.Singleton().query(sql)
|
|
|
+ return true, {}
|
|
|
+end
|
|
|
+
|
|
|
--设置 专辑链接 album_link
|
|
|
function M.set_album_link(msg_body)
|
|
|
local isok ,key = tools.checkData({"album_link","id_list"},msg_body)
|
|
@@ -384,7 +396,7 @@ end
|
|
|
|
|
|
--添加书籍数据
|
|
|
function M.add_book_data(msg_body)
|
|
|
- local isok ,key = tools.checkData({"words","author","fee_unit","default_price","default_pay_section","publish_time","status","product_parent_id","tg_platform_id","product_id","product_name"
|
|
|
+ local isok ,key = tools.checkData({"list_time","words","author","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)
|
|
@@ -412,7 +424,8 @@ function M.add_book_data(msg_body)
|
|
|
return false,"书籍已存在!"
|
|
|
end
|
|
|
|
|
|
- sql = string.format("INSERT INTO `video_product` (totalChapterNum,match_book,words,author,album_link,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,'%s','%s','%s','%s',%d,%f,%d,'%s',%d,'%s',%d,'%s','%s',%d,%d,0)",
|
|
|
+ sql = string.format("INSERT INTO `video_product` (list_time,totalChapterNum,match_book,words,author,album_link,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 ('%s',%d,'%s','%s','%s','%s',%d,%f,%d,'%s',%d,'%s',%d,'%s','%s',%d,%d,0)",
|
|
|
+ msg_body.list_time,
|
|
|
totalChapterNum,
|
|
|
match_book,
|
|
|
msg_body.words,
|