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()]); }); }