mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
文件用户隔离
This commit is contained in:
parent
b1054f4390
commit
46644f6482
@ -19,6 +19,7 @@ namespace app\admin\controller;
|
|||||||
use think\admin\Controller;
|
use think\admin\Controller;
|
||||||
use think\admin\helper\QueryHelper;
|
use think\admin\helper\QueryHelper;
|
||||||
use think\admin\model\SystemFile;
|
use think\admin\model\SystemFile;
|
||||||
|
use think\admin\service\AdminService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统文件管理
|
* 系统文件管理
|
||||||
@ -53,8 +54,8 @@ class File extends Controller
|
|||||||
$this->title = '系统文件管理';
|
$this->title = '系统文件管理';
|
||||||
$this->xexts = SystemFile::mk()->distinct()->column('xext');
|
$this->xexts = SystemFile::mk()->distinct()->column('xext');
|
||||||
}, function (QueryHelper $query) {
|
}, function (QueryHelper $query) {
|
||||||
$query->like('name,hash,xext')->dateBetween('create_at');
|
$query->like('name,hash,xext')->equal('type')->dateBetween('create_at');
|
||||||
$query->where(['issafe' => 0, 'status' => 2])->equal('type');
|
$query->where(['issafe' => 0, 'status' => 2, 'uuid' => AdminService::getUserId()]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,8 +152,8 @@ class Upload extends Controller
|
|||||||
SystemFile::mQuery()->layTable(function () {
|
SystemFile::mQuery()->layTable(function () {
|
||||||
$this->title = '文件选择器';
|
$this->title = '文件选择器';
|
||||||
}, function (QueryHelper $query) {
|
}, function (QueryHelper $query) {
|
||||||
$query->like('name,hash')->dateBetween('create_at');
|
$query->like('name,hash')->dateBetween('create_at')->order('id desc');
|
||||||
$query->where(['status' => 2, 'issafe' => 0])->order('id desc');
|
$query->where(['status' => 2, 'issafe' => 0, 'uuid' => AdminService::getUserId()]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,8 +170,8 @@ class Upload extends Controller
|
|||||||
SystemFile::mQuery()->layTable(function () {
|
SystemFile::mQuery()->layTable(function () {
|
||||||
$this->title = '文件选择器';
|
$this->title = '文件选择器';
|
||||||
}, function (QueryHelper $query) {
|
}, function (QueryHelper $query) {
|
||||||
$query->where(['status' => 2])->order('id desc');
|
$query->like('name,hash')->dateBetween('create_at')->order('id desc');
|
||||||
$query->like('name,hash')->dateBetween('create_at');
|
$query->where(['status' => 2, 'issafe' => 0, 'uuid' => AdminService::getUserId()]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,8 +188,8 @@ class Upload extends Controller
|
|||||||
SystemFile::mQuery()->layTable(function () {
|
SystemFile::mQuery()->layTable(function () {
|
||||||
$this->title = '文件选择器';
|
$this->title = '文件选择器';
|
||||||
}, function (QueryHelper $query) {
|
}, function (QueryHelper $query) {
|
||||||
$query->where(['status' => 2])->order('id desc');
|
$query->like('name,hash')->dateBetween('create_at')->order('id desc');
|
||||||
$query->like('name,hash')->dateBetween('create_at');
|
$query->where(['status' => 2, 'issafe' => 0, 'uuid' => AdminService::getUserId()]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user