Commit 5605bf77 authored by jianghaiming's avatar jianghaiming

update:set

parent 91e9db2f
......@@ -579,7 +579,7 @@ class GoodsService
if ($params["expiration_time"] < date("Y-m-d H:i:s")) {
throw new GoodsException(['cus' => 16]);
}
$inventoryCount = $skuData["inventory_rest"] + $params["inventory_add"];
$inventoryCount = $skuData["inventory_rest"] + $params["inventory"];
if ($inventoryCount < 0) {
throw new GoodsException(['cus' => 18]);
}
......@@ -624,7 +624,7 @@ class GoodsService
"rule_date_type" => empty($params["rule_date_type"]) ? GoodsSku::RULE_DATE_TYPE_1 : $params["rule_date_type"],
"rule_start_time" => empty($params["rule_start_time"]) ? "" : $params["rule_start_time"],
"rule_end_time" => empty($params["rule_end_time"]) ? "" : $params["rule_end_time"],
"inventory_total" => $skuData["inventory_total"] + $params["inventory_add"],
"inventory_total" => $skuData["inventory_total"] + $params["inventory"],
"inventory_rest" => $inventoryCount,
"original_price" => $params["original_price"] * 100,
"price" => $params["price"] * 100,
......
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