From 18a8263f587c2468b3bc22b71d2b0448a78fb1b2 Mon Sep 17 00:00:00 2001 From: Jone Shen Date: Tue, 11 Mar 2025 11:43:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B8=85=E7=90=86?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=96=87=E4=BB=B6=E5=8A=9F=E8=83=BD=E4=BC=9A?= =?UTF-8?q?=E6=8A=8A=E9=9D=9E=E5=BD=93=E5=89=8D=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6=E6=95=B0=E6=8D=AE=E5=BA=93=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=85=A8=E9=83=A8=E5=88=A0=E9=99=A4=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/think-plugs-admin/src/controller/File.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/think-plugs-admin/src/controller/File.php b/plugin/think-plugs-admin/src/controller/File.php index 30331ef0c..7cd0395d5 100644 --- a/plugin/think-plugs-admin/src/controller/File.php +++ b/plugin/think-plugs-admin/src/controller/File.php @@ -108,10 +108,10 @@ class File extends Controller */ public function distinct() { - $map = ['uuid' => AdminService::getUserId()]; + $map = ['issafe' => 0, 'uuid' => AdminService::getUserId()]; $db1 = SystemFile::mk()->fieldRaw('max(id) id')->where($map)->group('type,xkey'); $db2 = $this->app->db->table($db1->buildSql())->alias('dt')->field('id'); - SystemFile::mk()->whereRaw("id not in {$db2->buildSql()}")->delete(); + SystemFile::mk()->where($map)->whereRaw("id not in {$db2->buildSql()}")->delete(); SystemFile::mk()->where($map)->where(['status' => 1])->delete(); $this->success('清理重复文件成功!'); }