处理商品价格同步的错误

This commit is contained in:
lewis 2025-01-02 15:10:06 +08:00
parent 52561ce880
commit dfae914b6f

View File

@ -101,16 +101,16 @@ class StoreProductPriceLogic extends BaseLogic
'status' => 1
]);
StoreProduct::where('id', $find['product_id'])->update([
'purchase' => $find['purchase'],
'cost' => $find['cost'],
'vip_price' => $find['cost'],
'price' => $find['price']
'purchase' => $find['purchase'] ?? 0,
'cost' => $find['cost'] ?? 0,
'vip_price' => $find['cost'] ?? 0,
'price' => $find['price'] ?? 0
]);
StoreBranchProduct::where('product_id', $find['product_id'])->update([
'purchase' => $find['purchase'],
'cost' => $find['cost'],
'vip_price' => $find['cost'],
'price' => $find['price']
'purchase' => $find['purchase'] ?? 0,
'cost' => $find['cost'] ?? 0,
'vip_price' => $find['cost'] ?? 0,
'price' => $find['price'] ?? 0
]);
self::setProductGroupPrice($find);
}