Commit a404e30f authored by luhongguang's avatar luhongguang

Merge branch 'develop' into test

parents 907e7945 f9538243
......@@ -358,7 +358,7 @@ class GoodsService
if ($status == GoodsSku::STATUS_PASS && $sku["expiration_time"] < date("Y-m-d H:i:s")) {
throw new GoodsException(["cus" => 30]);
}
if ($sku["inventory_rest"] <= 0) {
if ($status == GoodsSku::STATUS_PASS && $sku["inventory_rest"] <= 0) {
throw new GoodsException(["cus" => 24]);
}
$goodsSkuId = $sku["goods_sku_id"];
......@@ -446,7 +446,7 @@ class GoodsService
if ($onlineStatus == GoodsSku::ONLINE_STATUS_ONLINE && $sku["expiration_time"] < date("Y-m-d H:i:s")) {
throw new GoodsException(["cus" => 30]);
}
if ($sku["inventory_rest"] <= 0) {
if ($onlineStatus == GoodsSku::ONLINE_STATUS_ONLINE && $sku["inventory_rest"] <= 0) {
throw new GoodsException(["cus" => 24]);
}
$goodsSkuId = $sku["goods_sku_id"];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment