904118851 4 mesiacov pred
rodič
commit
6f775f0ecf
1 zmenil súbory, kde vykonal 12 pridanie a 0 odobranie
  1. 12 0
      service/backmgr/book_black_list.lua

+ 12 - 0
service/backmgr/book_black_list.lua

@@ -48,6 +48,18 @@ function M.is_black_book(msg_body)
     return true, {is_black_book = #res > 0}
 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)
     local isok ,key =  tools.checkData({"page_size","page_number","product_id","product_name"},msg_body)
     if not isok then