From a122a25a83c22a8826b227dd0cca1f06e9a6ea0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=BF=E8=AF=BA?= <1322522027@qq.com> Date: Wed, 20 Aug 2025 02:00:22 +0000 Subject: [PATCH] =?UTF-8?q?update=20app/admin/controller/File.php.=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=E6=9B=B4=E6=96=B0=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E5=9C=A8=E5=AD=90=E6=9F=A5=E8=AF=A2=E4=B8=AD?= =?UTF-8?q?=E5=BC=95=E7=94=A8=E5=90=8C=E4=B8=80=E4=B8=AA=E8=A1=A8=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 承诺 <1322522027@qq.com> --- app/admin/controller/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/controller/File.php b/app/admin/controller/File.php index 87202286a..ad4bc5693 100644 --- a/app/admin/controller/File.php +++ b/app/admin/controller/File.php @@ -110,7 +110,7 @@ class File extends Controller { $map = ['issafe' => 0, 'uuid' => AdminService::getUserId()]; $subQuery = SystemFile::mk()->fieldRaw('MAX(id) AS id')->where($map)->group('type, xkey')->buildSql(); - SystemFile::mk()->where($map)->whereRaw("id NOT IN ({$subQuery})")->delete(); + SystemFile::mk()->where($map)->whereRaw("id NOT IN (SELECT id FROM ({$subQuery}) AS file_table)")->delete(); $this->success('清理重复文件成功!'); } } \ No newline at end of file