Commit 907e7945 authored by luhongguang's avatar luhongguang

Merge branch 'develop' into test

parents 9b61e80e 60101c58
......@@ -358,6 +358,9 @@ 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) {
throw new GoodsException(["cus" => 24]);
}
$goodsSkuId = $sku["goods_sku_id"];
$rejectedReason = strlen(trim($params["rejected_reason"])) == 0 ? "" : $params["rejected_reason"];
......@@ -443,6 +446,9 @@ 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) {
throw new GoodsException(["cus" => 24]);
}
$goodsSkuId = $sku["goods_sku_id"];
GoodsSku::save(["online_status" => $onlineStatus], ["goods_sku_id" => $goodsSkuId]);
......
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