采购单处理

This commit is contained in:
root
2025-09-22 15:50:36 +08:00
parent e12d5951e4
commit bdefd69a13
6 changed files with 254 additions and 27 deletions
+5 -1
View File
@@ -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;
}
/**