feat: config
This commit is contained in:
@@ -104,6 +104,12 @@ class OrderInfoService extends BaseService
|
||||
$skuList = array_column($skuList, null,'id');
|
||||
$imageList = $this->getOssObjects(array_column($skuList,'image_ids'));
|
||||
|
||||
$spuIds = array_unique(array_column($skuList,'spu_id'));
|
||||
$spuList = $this->spuModel->getDataArrByIds($spuIds);
|
||||
$spuList = array_column($skuList, null,'id');
|
||||
|
||||
$chefId = array_unique(array_column($spuList,'chef_id'));
|
||||
|
||||
$orderCopiesList = [];
|
||||
for ($i = 1; $i <= ($orderInfo['copies'] ?? 0); $i++) {
|
||||
|
||||
@@ -123,7 +129,15 @@ class OrderInfoService extends BaseService
|
||||
$skuInfo['url'] = $imageList[$imageId]['url'] ?? '';
|
||||
$oneCopiesInfo['image_list'][] = $imageList[$imageId] ?? [];
|
||||
|
||||
$oneCopiesInfo['sku_list'][] = $skuInfo;
|
||||
$oneCopiesInfo['sku_list'][] = [
|
||||
'url' => $imageList[$imageId]['url'] ?? '',
|
||||
'title' => $skuList[$item['sku_id']]['title'] ?? '',
|
||||
'unit_price' => $item['unit_price'],
|
||||
'quantity' => $item['quantity'],
|
||||
'price' => bcmul($item['unit_price'], $item['quantity'], 2),
|
||||
'chef_name' => '123',
|
||||
'spu_title' => $spuList[$skuList[$item['sku_id']]['spu_id']]['title'] ?? '',
|
||||
];
|
||||
$oneCopiesInfo['total_price'] = bcadd($oneCopiesInfo['total_price'], bcmul($item['unit_price'],(string)$item['quantity'],2), 2);
|
||||
$oneCopiesInfo['total_quantity'] += $item['quantity'];
|
||||
}
|
||||
@@ -133,5 +147,7 @@ class OrderInfoService extends BaseService
|
||||
|
||||
$orderInfo['copies_list'] = $orderCopiesList;
|
||||
$orderInfo['site'] = $this->siteCache->getSiteInfo($orderInfo['site_id']);
|
||||
|
||||
//todo coupon
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user