Commit a76f972d by 杨树贤

成本价显示问题

parent 2927173d
Showing with 5 additions and 0 deletions
...@@ -77,11 +77,16 @@ class SkuService ...@@ -77,11 +77,16 @@ class SkuService
} }
} }
} }
//获取价格 //获取价格
$moqPrice = []; $moqPrice = [];
if (!empty($sku['ladder_price'])) { if (!empty($sku['ladder_price'])) {
$priceService = new PriceService(); $priceService = new PriceService();
$moqPrice = $priceService->getMoqPrice($sku['ladder_price']); $moqPrice = $priceService->getMoqPrice($sku['ladder_price']);
foreach ($sku['ladder_price'] as &$ladder) {
$ladder['purchases'] = $ladder['purchases'] == 0 ? $sku['moq'] : $ladder['purchases'];
}
unset($ladder);
} }
$sku['cn_price'] = array_get($moqPrice, 'price_cn'); $sku['cn_price'] = array_get($moqPrice, 'price_cn');
$sku['us_price'] = array_get($moqPrice, 'price_us'); $sku['us_price'] = array_get($moqPrice, 'price_us');
......
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 sign in to comment