mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-01-08 16:26:57 +08:00
Pre Merge pull request !44 from 承诺/v6
This commit is contained in:
commit
e84e02d190
@ -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('清理重复文件成功!');
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user