Commit 2bb01265 authored by luhongguang's avatar luhongguang

update:拼单列表

parent 2893fd0e
...@@ -234,10 +234,13 @@ class MarketingService ...@@ -234,10 +234,13 @@ class MarketingService
"online_status", "update_time", "create_time"] "online_status", "update_time", "create_time"]
, $where); , $where);
$lists = [];
if (!empty($list)) {
$marketingIds = []; $marketingIds = [];
foreach ($list as $key => $value) { foreach ($list as $key => $value) {
$marketingIds[] = $value["marketing_id"]; $marketingIds[] = $value["marketing_id"];
} }
$marketingPindanData = MarketingPindan::select(["marketing_id", "min_price", "max_price", "pindan_desc"] $marketingPindanData = MarketingPindan::select(["marketing_id", "min_price", "max_price", "pindan_desc"]
, ["marketing_id" => $marketingIds]); , ["marketing_id" => $marketingIds]);
$priceData = []; $priceData = [];
...@@ -247,7 +250,6 @@ class MarketingService ...@@ -247,7 +250,6 @@ class MarketingService
} }
} }
$lists = [];
foreach ($list as $key => $value) { foreach ($list as $key => $value) {
$lists[$key] = $value; $lists[$key] = $value;
$lists[$key]["online_status_desc"] = Marketing::$onlineStatusDesc[$value["online_status"]]; $lists[$key]["online_status_desc"] = Marketing::$onlineStatusDesc[$value["online_status"]];
...@@ -257,6 +259,8 @@ class MarketingService ...@@ -257,6 +259,8 @@ class MarketingService
$lists[$key]["pindan_desc"] = $priceData[$value["marketing_id"]]["pindan_desc"]; $lists[$key]["pindan_desc"] = $priceData[$value["marketing_id"]]["pindan_desc"];
} }
} }
}
unset($where['LIMIT']); unset($where['LIMIT']);
unset($where['ORDER']); unset($where['ORDER']);
$count = Marketing::count("*", $where); $count = Marketing::count("*", $where);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment