mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-28 13:31:04 +00:00
fix(商品): 编辑商品不再覆盖真实销量
This commit is contained in:
parent
0ae6971cbd
commit
a23eadfb09
@ -66,6 +66,8 @@ class ProductSaveServices extends BaseService
|
||||
|
||||
$productId = $this->transaction(function () use ($id, $data, $centerData) {
|
||||
if ($id > 0) {
|
||||
// 编辑不覆盖真实销量:sales 由支付成功累加、退款递减,保存表单不收集该字段,固定 0 更新会把销量清零
|
||||
unset($centerData['sales']);
|
||||
$this->centerProductServices->update($id, $centerData);
|
||||
$productId = $id;
|
||||
} else {
|
||||
|
||||
@ -56,6 +56,8 @@ class ProductSaveServices extends BaseService
|
||||
|
||||
$productId = $this->transaction(function () use ($id, $data, $centerData) {
|
||||
if ($id > 0) {
|
||||
// 编辑不覆盖真实销量:sales 由支付成功累加、退款递减,保存表单不收集该字段,固定 0 更新会把销量清零
|
||||
unset($centerData['sales']);
|
||||
$this->centerProductServices->update($id, $centerData);
|
||||
$productId = $id;
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user