正在显示
1 个修改的文件
包含
7 行增加
和
7 行删除
| @@ -20,13 +20,13 @@ class DeptController extends BaseController | @@ -20,13 +20,13 @@ class DeptController extends BaseController | ||
| 20 | 20 | ||
| 21 | public function lists(DeptLogic $logic) | 21 | public function lists(DeptLogic $logic) |
| 22 | { | 22 | { |
| 23 | -// $map = []; | ||
| 24 | -// if(!empty($this->param['search'])){ | ||
| 25 | -// $map[] = ['title', 'like', "%{$this->param['search']}%"]; | ||
| 26 | -// } | ||
| 27 | -// $sort = ['id' => 'desc']; | ||
| 28 | -// $data = $logic->getList($map, $sort, ['id', 'pid', 'title'],0); | ||
| 29 | -// return $this->success(Arr::listToTree($data)); | 23 | + $map = []; |
| 24 | + if(!empty($this->param['search'])){ | ||
| 25 | + $map[] = ['title', 'like', "%{$this->param['search']}%"]; | ||
| 26 | + } | ||
| 27 | + $sort = ['id' => 'desc']; | ||
| 28 | + $data = $logic->getList($map, $sort, ['id', 'pid', 'title'],0); | ||
| 29 | + return $this->success(Arr::listToTree($data)); | ||
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | public function info(Request $request, DeptLogic $logic){ | 32 | public function info(Request $request, DeptLogic $logic){ |
-
请 注册 或 登录 后发表评论