wesmiler 3 месяцев назад
Родитель
Сommit
f5901cf0d3
2 измененных файлов с 1 добавлено и 2 удалено
  1. 1 1
      app/Services/Api/GoodsService.php
  2. 0 1
      app/Services/Api/StoreService.php

+ 1 - 1
app/Services/Api/GoodsService.php

@@ -253,7 +253,7 @@ class GoodsService extends BaseService
                     return false;
                 }
 
-                if($skuStock<=0 || $num>$skuStock){
+                if($skuType==2 && ($skuStock<=0 || $num>$skuStock)){
                     $this->error = "商品[{$goodsName}]规格[{$skuName}]库存不足~";
                     return false;
                 }

+ 0 - 1
app/Services/Api/StoreService.php

@@ -215,7 +215,6 @@ class StoreService extends BaseService
 
         $storeId = isset($parentStoreInfo['id'])?$parentStoreInfo['id'] : 0;
         $parentUserId = isset($parentStoreInfo['user_id'])?$parentStoreInfo['user_id'] : 0;
-
         if($parentStoreInfo && $storeId>0){
             RedisService::set($cacheKey, $storeId, 7 * 86400);
             RedisService::set($ipKey, $storeId, 7 * 86400);