Commit 8c3d5ec4 authored by luhongguang's avatar luhongguang

update:拼单商品info

parent c682fcaa
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace App\Services\marketing; namespace App\Services\marketing;
use App\Models\goods\mysql\Ota;
use App\Models\goods\mysql\PindanGoodsSku; use App\Models\goods\mysql\PindanGoodsSku;
use App\Models\marketing\mysql\Marketing; use App\Models\marketing\mysql\Marketing;
use App\Models\marketing\mysql\MarketingGoods; use App\Models\marketing\mysql\MarketingGoods;
...@@ -725,8 +726,15 @@ class MarketingService ...@@ -725,8 +726,15 @@ class MarketingService
$info['marketing_info'] = $marketingData; $info['marketing_info'] = $marketingData;
if (!empty($goodsSkuList)) { if (!empty($goodsSkuList)) {
$otaIds = array_unique(array_column($goodsSkuList, "ota_id"));
$otas = Ota::select(["ota_id", "ota_name"], ["ota_id" => $otaIds]);
foreach ($otas as $key => $item) {
$otasData[$item["ota_id"]] = $item;
}
foreach ($goodsSkuList as $key => $item) { foreach ($goodsSkuList as $key => $item) {
$goodsSkuList[$key]["desc_pic_url_list"] = GoodsService::getUrlList($item["desc_pic_url"]); $goodsSkuList[$key]["desc_pic_url_list"] = GoodsService::getUrlList($item["desc_pic_url"]);
$goodsSkuList[$key]["ota_name"] = $otasData[$item["ota_id"]]["ota_name"];
} }
} }
......
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