From b1203379878f203d54df451a287b4bb918f7daa8 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Wed, 10 Sep 2025 15:02:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/UploadedFilesService.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/common/service/UploadedFilesService.php b/app/common/service/UploadedFilesService.php index 3689ac0..1e2435d 100644 --- a/app/common/service/UploadedFilesService.php +++ b/app/common/service/UploadedFilesService.php @@ -142,7 +142,9 @@ class UploadedFilesService */ public function getFile(array $where) { - $file = $this->logicShow(['where' => $where]); + $config['model'] = $this->modelClass; + $config['where'] = $where; + $file = $this->logicShow($config); if (!$file) { return false; @@ -159,14 +161,20 @@ class UploadedFilesService */ public function deleteFile(int $fileId): bool { - $file = $this->logicShow(['where' => ['id' => $fileId]]); + $config['model'] = $this->modelClass; + $config['where'] = ['id' => $fileId]; + $file = $this->logicShow($config); if (!$file) { return false; } // 删除数据库记录 - return $this->logicDeleteBy(['where' => ['id' => $fileId]]); + $config =[ + 'model' => $this->modelClass, + 'where' => ['id' => $fileId], + ]; + return $this->logicDeleteBy($config); } /**