调试商品库存入库

This commit is contained in:
luofei 2023-07-06 11:28:59 +08:00
parent e7d94907f8
commit 10e2ca5d06

View File

@ -2333,7 +2333,7 @@ class ProductRepository extends BaseRepository
if (!$model->save($data)) {
throw new \Exception('入库失败');
}
if (!$orderProduct->save(['is_imported' => 1])) {
if (isset($orderProduct) && !$orderProduct->save(['is_imported' => 1])) {
throw new \Exception('订单商品更新出错');
}
}