作者 李宇航

合并分支 'lyh-server' 到 'master'

变更数据



查看合并请求 !2902
@@ -213,14 +213,15 @@ class TicketUploadDataController extends BaseController @@ -213,14 +213,15 @@ class TicketUploadDataController extends BaseController
213 'project_id.required' => 'project_id不能为空', 213 'project_id.required' => 'project_id不能为空',
214 'type.required' => 'type不能为空', 214 'type.required' => 'type不能为空',
215 ]); 215 ]);
216 - ProjectServer::useProject($this->param['project_id']);  
217 - if ($this->param['type'] == 1) { 216 + ProjectServer::useProject($this->map['project_id']);
  217 + if ($this->map['type'] == 1) {
218 //todo::搜索获取分类 218 //todo::搜索获取分类
219 $productCateModel = new Category(); 219 $productCateModel = new Category();
220 - if(!empty($this->param['search']) && isset($this->param['search'])){  
221 - $this->map['name'] = ['like' , '%' . $this->param['search'] . '%']; 220 + if(!empty($this->map['search']) && isset($this->map['search'])){
  221 + $this->map['name'] = ['like' , '%' . $this->map['search'] . '%'];
222 unset($this->param['search']); 222 unset($this->param['search']);
223 } 223 }
  224 + unset($this->map['type']);
224 $cate_list = $productCateModel->list($this->map, 'sort',['id','title']); 225 $cate_list = $productCateModel->list($this->map, 'sort',['id','title']);
225 if ($cate_list === false) { 226 if ($cate_list === false) {
226 $this->response('无分类'); 227 $this->response('无分类');
@@ -235,10 +236,10 @@ class TicketUploadDataController extends BaseController @@ -235,10 +236,10 @@ class TicketUploadDataController extends BaseController
235 } 236 }
236 } else { 237 } else {
237 $keywordModel = new Keyword(); 238 $keywordModel = new Keyword();
238 - if(!isset($this->param['search']) || empty($this->param['search'])){ 239 + if(!isset($this->map['search']) || empty($this->map['search'])){
239 $data = $keywordModel->lists([], 1, 20,'id',['id','title as name']); 240 $data = $keywordModel->lists([], 1, 20,'id',['id','title as name']);
240 }else{ 241 }else{
241 - $data = $keywordModel->lists(['title' => ['like','%' . $this->param['search'] . '%']], 1, 20,'id',['id','title as name']); 242 + $data = $keywordModel->lists(['title' => ['like','%' . $this->map['search'] . '%']], 1, 20,'id',['id','title as name']);
242 } 243 }
243 } 244 }
244 DB::disconnect('custom_mysql'); 245 DB::disconnect('custom_mysql');
@@ -263,9 +264,9 @@ class TicketUploadDataController extends BaseController @@ -263,9 +264,9 @@ class TicketUploadDataController extends BaseController
263 ]); 264 ]);
264 ProjectServer::useProject($this->map['project_id']); 265 ProjectServer::useProject($this->map['project_id']);
265 $newsCateModel = new NewsCategory(); 266 $newsCateModel = new NewsCategory();
266 - if(!empty($this->param['search']) && isset($this->param['search'])){  
267 - $this->map['name'] = ['like' , '%' . $this->param['search'] . '%'];  
268 - unset($this->param['search']); 267 + if(!empty($this->map['search']) && isset($this->map['search'])){
  268 + $this->map['name'] = ['like' , '%' . $this->map['search'] . '%'];
  269 + unset($this->map['search']);
269 } 270 }
270 $cate_list = $newsCateModel->list($this->map, 'sort',['id','name as title']); 271 $cate_list = $newsCateModel->list($this->map, 'sort',['id','name as title']);
271 if ($cate_list === false) { 272 if ($cate_list === false) {
@@ -299,11 +300,11 @@ class TicketUploadDataController extends BaseController @@ -299,11 +300,11 @@ class TicketUploadDataController extends BaseController
299 'project_id.required' => 'project_id不能为空', 300 'project_id.required' => 'project_id不能为空',
300 'search.required' => '搜索参数不能为空', 301 'search.required' => '搜索参数不能为空',
301 ]); 302 ]);
302 - ProjectServer::useProject($this->param['project_id']); 303 + ProjectServer::useProject($this->map['project_id']);
303 $newsCateModel = new NewsCategory(); 304 $newsCateModel = new NewsCategory();
304 - if(!empty($this->param['search']) && isset($this->param['search'])){  
305 - $this->map['name'] = ['like' , '%' . $this->param['search'] . '%'];  
306 - unset($this->param['search']); 305 + if(!empty($this->map['search']) && isset($this->map['search'])){
  306 + $this->map['name'] = ['like' , '%' . $this->map['search'] . '%'];
  307 + unset($this->map['search']);
307 } 308 }
308 $cate_list = $newsCateModel->list($this->map, 'sort',['id','name as title']); 309 $cate_list = $newsCateModel->list($this->map, 'sort',['id','name as title']);
309 if ($cate_list === false) { 310 if ($cate_list === false) {