|
@@ -48,6 +48,18 @@ function M.is_black_book(msg_body)
|
|
return true, {is_black_book = #res > 0}
|
|
return true, {is_black_book = #res > 0}
|
|
end
|
|
end
|
|
|
|
|
|
|
|
+function M.who_at_in_black(msg_body)
|
|
|
|
+ local isok ,key = tools.checkData({"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("SELECT * FROM black_list WHERE product_id IN (%s)",idString)..string.format(" LIMIT %d OFFSET %d ",page_size, offset)
|
|
|
|
+ local isok,res;
|
|
|
|
+ res = mysqldbx.query(sql)
|
|
|
|
+ return true,res
|
|
|
|
+end
|
|
|
|
+
|
|
function M.search_book_list(msg_body)
|
|
function M.search_book_list(msg_body)
|
|
local isok ,key = tools.checkData({"page_size","page_number","product_id","product_name"},msg_body)
|
|
local isok ,key = tools.checkData({"page_size","page_number","product_id","product_name"},msg_body)
|
|
if not isok then
|
|
if not isok then
|