采购单处理
This commit is contained in:
@@ -192,7 +192,11 @@ class CrudUtil
|
||||
*/
|
||||
public static function findOneBy(Builder $q): Model
|
||||
{
|
||||
return $q->first();
|
||||
$model = $q->first();
|
||||
if (!$model) {
|
||||
throw new BusinessException("记录不存在", 404);
|
||||
}
|
||||
return $model;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user