904118851 před 9 měsíci
rodič
revize
2a823d5611
1 změnil soubory, kde provedl 18 přidání a 0 odebrání
  1. 18 0
      service/backmgr/filter_task.lua

+ 18 - 0
service/backmgr/filter_task.lua

@@ -140,6 +140,24 @@ function M.get_tui_guang(msg_body)
     res = mysqldbx.query(sql)
     return true,res
 end
+
+
+--根据素材id搜索 material_id
+function M.search_zeng_liang_by_material_id(msg_body)
+    local isok ,key =  tools.checkData({"material_id"},msg_body)
+    if not isok then
+        return false,string.format("缺少字段: %s.", key)
+    end
+    local sql = string.format("SELECT * FROM video_material  WHERE material_id = %d  LIMIT 1 ", msg_body.material_id)
+    local res;
+    res = mysqldbx.query(sql)
+    local info = {}
+    if #res>0 then
+        info = res[1]
+    end
+    return true,info
+end
+
 --推广增量
 function M.tui_guang_zeng_liang(msg_body)
     local isok ,key =  tools.checkData({"main_id","quantity","bid_type","id_list"},msg_body)