Merge branch 'feature/purchase_record' into dev

This commit is contained in:
luofei 2023-07-06 11:29:08 +08:00
commit 5962883929

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('订单商品更新出错');
}
}