|
@@ -26,7 +26,7 @@ function M.set_status(msg_body)
|
|
|
end
|
|
|
|
|
|
function M.search_promotion_audit_suggestions(msg_body)
|
|
|
- local isok ,key = tools.checkData({"page_size","page_number","start_create_time","end_create_time",
|
|
|
+ local isok ,key = tools.checkData({"butler_id","page_size","page_number","start_create_time","end_create_time",
|
|
|
"advertiser_id","promotion_id","material_type","material_item","status"},msg_body)
|
|
|
if not isok then
|
|
|
return false,string.format("缺少字段: %s.", key)
|
|
@@ -35,6 +35,11 @@ function M.search_promotion_audit_suggestions(msg_body)
|
|
|
local page_number = msg_body.page_number
|
|
|
local offset = (page_number - 1) * page_size
|
|
|
|
|
|
+
|
|
|
+ local butler_id_param = ""
|
|
|
+ if msg_body.butler_id~="" then
|
|
|
+ butler_id_param = " AND butler_id = "..msg_body.butler_id
|
|
|
+ end
|
|
|
|
|
|
local advertiser_id_param = ""
|
|
|
if msg_body.advertiser_id~="" then
|
|
@@ -76,7 +81,7 @@ function M.search_promotion_audit_suggestions(msg_body)
|
|
|
create_date_param = " AND DATE(created_at) >= DATE(FROM_UNIXTIME(" .. (msg_body.start_create_time / 1000) .. ")) AND DATE(created_at) <= DATE(FROM_UNIXTIME(" .. (msg_body.end_create_time / 1000) .. "))"
|
|
|
end
|
|
|
|
|
|
- local param = create_date_param..advertiser_id_param..promotion_id_param..material_type_param..material_item_param..status_param..product_id_param..product_library_id_param
|
|
|
+ local param = create_date_param..advertiser_id_param..promotion_id_param..material_type_param..material_item_param..status_param..product_id_param..product_library_id_param..butler_id_param
|
|
|
|
|
|
local sql = "SELECT * FROM promotion_audit_suggestions WHERE 1=1 "..param.. " ORDER BY cost DESC "..string.format(" LIMIT %d OFFSET %d ",page_size, offset)
|
|
|
|