|
@@ -254,6 +254,18 @@ function M.set_video_product_start_chapter(msg_body)
|
|
|
return true, {}
|
|
|
end
|
|
|
|
|
|
+--设置书状态
|
|
|
+function M.set_status(msg_body)
|
|
|
+ local isok ,key = tools.checkData({"status","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 status = %d WHERE id IN (%s) ",msg_body.genre,idString)
|
|
|
+ mysqldtaskbx.Singleton().query(sql)
|
|
|
+ return true, {}
|
|
|
+end
|
|
|
+
|
|
|
function mysqldtaskbx.start()
|
|
|
local function on_connect(db)
|
|
|
db:query("set charset utf8mb4");
|