feat : order

This commit is contained in:
2025-03-06 16:25:25 +08:00
parent 5ad53e55be
commit 88fdd218b3
10 changed files with 82 additions and 57 deletions

View File

@@ -107,7 +107,7 @@ class OrderInfoService extends BaseService
$imageList = $this->getOssObjects($imageIds);
$orderCopiesList = [];
for ($i = 1; $i <= ($orderInfo['meal_copies'] + $orderInfo['optional_copies']); $i++) {
for ($i = 1; $i <= ($orderInfo['copies'] ?? 0); $i++) {
$oneCopiesInfo = [
'total_price' => '0.00',
@@ -115,7 +115,7 @@ class OrderInfoService extends BaseService
'sku_list' => [],
'image_list' => [],
'take_food_code' => '', //todo 取餐码
'copies_type' => 0,
// 'copies_type' => 0,
];
foreach ($newOrderSkuList[$i] as $item) {
@@ -128,7 +128,7 @@ class OrderInfoService extends BaseService
$oneCopiesInfo['sku_list'][] = $skuInfo;
$oneCopiesInfo['image_list'][] = $imageList[$imageId] ?? [];
if ($oneCopiesInfo['copies_type'] == 0) $oneCopiesInfo['copies_type'] = $item['type'];
// if ($oneCopiesInfo['copies_type'] == 0) $oneCopiesInfo['copies_type'] = $item['type'];
}
// foreach ($newOrderSkuList as $item) {
// if ($item['order_id'] != $order['id'] || $item['copies'] != $i) continue;