|
...
|
...
|
@@ -213,14 +213,15 @@ class TicketUploadDataController extends BaseController |
|
|
|
'project_id.required' => 'project_id不能为空',
|
|
|
|
'type.required' => 'type不能为空',
|
|
|
|
]);
|
|
|
|
ProjectServer::useProject($this->param['project_id']);
|
|
|
|
if ($this->param['type'] == 1) {
|
|
|
|
ProjectServer::useProject($this->map['project_id']);
|
|
|
|
if ($this->map['type'] == 1) {
|
|
|
|
//todo::搜索获取分类
|
|
|
|
$productCateModel = new Category();
|
|
|
|
if(!empty($this->param['search']) && isset($this->param['search'])){
|
|
|
|
$this->map['name'] = ['like' , '%' . $this->param['search'] . '%'];
|
|
|
|
if(!empty($this->map['search']) && isset($this->map['search'])){
|
|
|
|
$this->map['name'] = ['like' , '%' . $this->map['search'] . '%'];
|
|
|
|
unset($this->param['search']);
|
|
|
|
}
|
|
|
|
unset($this->map['type']);
|
|
|
|
$cate_list = $productCateModel->list($this->map, 'sort',['id','title']);
|
|
|
|
if ($cate_list === false) {
|
|
|
|
$this->response('无分类');
|
|
...
|
...
|
@@ -235,10 +236,10 @@ class TicketUploadDataController extends BaseController |
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$keywordModel = new Keyword();
|
|
|
|
if(!isset($this->param['search']) || empty($this->param['search'])){
|
|
|
|
if(!isset($this->map['search']) || empty($this->map['search'])){
|
|
|
|
$data = $keywordModel->lists([], 1, 20,'id',['id','title as name']);
|
|
|
|
}else{
|
|
|
|
$data = $keywordModel->lists(['title' => ['like','%' . $this->param['search'] . '%']], 1, 20,'id',['id','title as name']);
|
|
|
|
$data = $keywordModel->lists(['title' => ['like','%' . $this->map['search'] . '%']], 1, 20,'id',['id','title as name']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
DB::disconnect('custom_mysql');
|
|
...
|
...
|
@@ -263,9 +264,9 @@ class TicketUploadDataController extends BaseController |
|
|
|
]);
|
|
|
|
ProjectServer::useProject($this->map['project_id']);
|
|
|
|
$newsCateModel = new NewsCategory();
|
|
|
|
if(!empty($this->param['search']) && isset($this->param['search'])){
|
|
|
|
$this->map['name'] = ['like' , '%' . $this->param['search'] . '%'];
|
|
|
|
unset($this->param['search']);
|
|
|
|
if(!empty($this->map['search']) && isset($this->map['search'])){
|
|
|
|
$this->map['name'] = ['like' , '%' . $this->map['search'] . '%'];
|
|
|
|
unset($this->map['search']);
|
|
|
|
}
|
|
|
|
$cate_list = $newsCateModel->list($this->map, 'sort',['id','name as title']);
|
|
|
|
if ($cate_list === false) {
|
|
...
|
...
|
@@ -299,11 +300,11 @@ class TicketUploadDataController extends BaseController |
|
|
|
'project_id.required' => 'project_id不能为空',
|
|
|
|
'search.required' => '搜索参数不能为空',
|
|
|
|
]);
|
|
|
|
ProjectServer::useProject($this->param['project_id']);
|
|
|
|
ProjectServer::useProject($this->map['project_id']);
|
|
|
|
$newsCateModel = new NewsCategory();
|
|
|
|
if(!empty($this->param['search']) && isset($this->param['search'])){
|
|
|
|
$this->map['name'] = ['like' , '%' . $this->param['search'] . '%'];
|
|
|
|
unset($this->param['search']);
|
|
|
|
if(!empty($this->map['search']) && isset($this->map['search'])){
|
|
|
|
$this->map['name'] = ['like' , '%' . $this->map['search'] . '%'];
|
|
|
|
unset($this->map['search']);
|
|
|
|
}
|
|
|
|
$cate_list = $newsCateModel->list($this->map, 'sort',['id','name as title']);
|
|
|
|
if ($cate_list === false) {
|
...
|
...
|
|