From 46644f64829d9ec9cb5d8ca46151ac3c647cf086 Mon Sep 17 00:00:00 2001 From: Anyon Date: Mon, 27 Jun 2022 15:45:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=94=A8=E6=88=B7=E9=9A=94?= =?UTF-8?q?=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/File.php | 5 +++-- app/admin/controller/api/Upload.php | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/admin/controller/File.php b/app/admin/controller/File.php index 49bd77e33..dd41ff147 100644 --- a/app/admin/controller/File.php +++ b/app/admin/controller/File.php @@ -19,6 +19,7 @@ namespace app\admin\controller; use think\admin\Controller; use think\admin\helper\QueryHelper; use think\admin\model\SystemFile; +use think\admin\service\AdminService; /** * 系统文件管理 @@ -53,8 +54,8 @@ class File extends Controller $this->title = '系统文件管理'; $this->xexts = SystemFile::mk()->distinct()->column('xext'); }, function (QueryHelper $query) { - $query->like('name,hash,xext')->dateBetween('create_at'); - $query->where(['issafe' => 0, 'status' => 2])->equal('type'); + $query->like('name,hash,xext')->equal('type')->dateBetween('create_at'); + $query->where(['issafe' => 0, 'status' => 2, 'uuid' => AdminService::getUserId()]); }); } diff --git a/app/admin/controller/api/Upload.php b/app/admin/controller/api/Upload.php index 63bebc4a6..c53db5870 100644 --- a/app/admin/controller/api/Upload.php +++ b/app/admin/controller/api/Upload.php @@ -152,8 +152,8 @@ class Upload extends Controller SystemFile::mQuery()->layTable(function () { $this->title = '文件选择器'; }, function (QueryHelper $query) { - $query->like('name,hash')->dateBetween('create_at'); - $query->where(['status' => 2, 'issafe' => 0])->order('id desc'); + $query->like('name,hash')->dateBetween('create_at')->order('id desc'); + $query->where(['status' => 2, 'issafe' => 0, 'uuid' => AdminService::getUserId()]); }); } @@ -170,8 +170,8 @@ class Upload extends Controller SystemFile::mQuery()->layTable(function () { $this->title = '文件选择器'; }, function (QueryHelper $query) { - $query->where(['status' => 2])->order('id desc'); - $query->like('name,hash')->dateBetween('create_at'); + $query->like('name,hash')->dateBetween('create_at')->order('id desc'); + $query->where(['status' => 2, 'issafe' => 0, 'uuid' => AdminService::getUserId()]); }); } @@ -188,8 +188,8 @@ class Upload extends Controller SystemFile::mQuery()->layTable(function () { $this->title = '文件选择器'; }, function (QueryHelper $query) { - $query->where(['status' => 2])->order('id desc'); - $query->like('name,hash')->dateBetween('create_at'); + $query->like('name,hash')->dateBetween('create_at')->order('id desc'); + $query->where(['status' => 2, 'issafe' => 0, 'uuid' => AdminService::getUserId()]); }); }