From 636289c211a059805281faef47c58db11f18b2c0 Mon Sep 17 00:00:00 2001 From: ctexthuang Date: Thu, 15 May 2025 15:26:01 +0800 Subject: [PATCH] feat : sts --- app/Constants/Common/CategoryCode.php | 2 ++ app/Service/Api/Good/OptionalListService.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Constants/Common/CategoryCode.php b/app/Constants/Common/CategoryCode.php index aa40828..dfc6015 100644 --- a/app/Constants/Common/CategoryCode.php +++ b/app/Constants/Common/CategoryCode.php @@ -10,4 +10,6 @@ class CategoryCode CONST int DISH = 1; CONST int STAPLE = 2; CONST int EXTRA_STAPLE = 3; + + CONST int SOUP = 5; } \ No newline at end of file diff --git a/app/Service/Api/Good/OptionalListService.php b/app/Service/Api/Good/OptionalListService.php index cc5bad3..e474671 100644 --- a/app/Service/Api/Good/OptionalListService.php +++ b/app/Service/Api/Good/OptionalListService.php @@ -104,6 +104,7 @@ class OptionalListService extends BaseService foreach ($data as &$item) { foreach ($item['sku_list'] as &$v) { $v['surplus_stock'] = $this->redisCache->zScore($stockKey,$v['id']) ?? 0; + $v['category_id'] = $item['category_id']; } if ($item['favorable'] == GoodCode::IS_FAVORABLE) { @@ -129,7 +130,7 @@ class OptionalListService extends BaseService $skuList = array_column($skuList,null,'id'); if (!empty($purchaseData)) { - foreach ($purchaseData as &$one) { + foreach ($purchaseData as &$one) { $onePurchaseSkuIds = explode(',',$one['sku_ids']); $onePurchaseSkuList = []; $onePurchaseSkuPrice = 0;