|
@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.*;
|
|
* Created by wangys on 2019/03/07
|
|
* Created by wangys on 2019/03/07
|
|
*/
|
|
*/
|
|
@RestController
|
|
@RestController
|
|
-@RequestMapping("/dept")
|
|
|
|
|
|
+ @RequestMapping("/dept")
|
|
public class DepartmentController {
|
|
public class DepartmentController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -27,6 +27,11 @@ public class DepartmentController {
|
|
return departmentService.getDeptChild(deptId);
|
|
return departmentService.getDeptChild(deptId);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @GetMapping("/select")
|
|
|
|
+ public ApiResult select(){
|
|
|
|
+ return departmentService.select();
|
|
|
|
+ }
|
|
|
|
+
|
|
@GetMapping("/{id}")
|
|
@GetMapping("/{id}")
|
|
public ApiResult findById(@PathVariable(name = "id") Long deptId){
|
|
public ApiResult findById(@PathVariable(name = "id") Long deptId){
|
|
return departmentService.getDeptById(deptId);
|
|
return departmentService.getDeptById(deptId);
|