From e41be712d346a2df30739a9cb6e3b3f3086ccd1c Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Mon, 15 Sep 2025 17:33:34 +0800 Subject: [PATCH] 1 --- app/common/service/UploadedFilesService.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/common/service/UploadedFilesService.php b/app/common/service/UploadedFilesService.php index 1e2435d..ed01db2 100644 --- a/app/common/service/UploadedFilesService.php +++ b/app/common/service/UploadedFilesService.php @@ -152,6 +152,22 @@ class UploadedFilesService return $file; } + /** + * 获取文件 + * + * @param string $path + * @return bool|\Illuminate\Database\Eloquent\Model + */ + public function findFile(array $where) + { + $file = UploadedFiles::where(['file_path' => $where['file_path']]); + + if (!$file) { + return false; + } + + return $file; + } /** * 删除文件