feat : sts

This commit is contained in:
2025-05-15 15:26:01 +08:00
parent e7ee489576
commit 636289c211
2 changed files with 4 additions and 1 deletions

View File

@@ -10,4 +10,6 @@ class CategoryCode
CONST int DISH = 1;
CONST int STAPLE = 2;
CONST int EXTRA_STAPLE = 3;
CONST int SOUP = 5;
}

View File

@@ -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;