|
|
@@ -11,34 +11,40 @@ import javax.annotation.Resource;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/permission")
|
|
|
+//系统权限控制器
|
|
|
public class EasPermissionController {
|
|
|
|
|
|
@Resource
|
|
|
EasPermissionService easPermissionService;
|
|
|
|
|
|
+ //首页
|
|
|
@GetMapping("/home")
|
|
|
public String home(){
|
|
|
return "home";
|
|
|
}
|
|
|
|
|
|
|
|
|
+ //排课信息
|
|
|
@GetMapping("/lesson")
|
|
|
public String lesson(){
|
|
|
return "lesson";
|
|
|
}
|
|
|
|
|
|
|
|
|
+ //排课表下载
|
|
|
@GetMapping("/lesson-download")
|
|
|
public String download(){
|
|
|
return "lesson-download";
|
|
|
}
|
|
|
|
|
|
+ //查询权限
|
|
|
@GetMapping("/query")
|
|
|
- public PageData query(@RequestParam Integer id){
|
|
|
+ public JsonResult query(@RequestParam Integer id){
|
|
|
PageData ret = easPermissionService.query(id);
|
|
|
- return ret;
|
|
|
+ return JsonResult.data(ret);
|
|
|
}
|
|
|
|
|
|
+ //添加权限
|
|
|
@PostMapping("/add")
|
|
|
public JsonResult add(@RequestBody EasSysPermission permission){
|
|
|
Boolean ret = easPermissionService.add(permission);
|
|
|
@@ -48,6 +54,7 @@ public class EasPermissionController {
|
|
|
return JsonResult.fail();
|
|
|
}
|
|
|
|
|
|
+ //删除权限
|
|
|
@DeleteMapping("/delete")
|
|
|
public JsonResult delete(@RequestParam Integer id){
|
|
|
Boolean ret = easPermissionService.delete(id);
|
|
|
@@ -57,6 +64,7 @@ public class EasPermissionController {
|
|
|
return JsonResult.fail();
|
|
|
}
|
|
|
|
|
|
+ //修改权限
|
|
|
@PutMapping("/update")
|
|
|
public JsonResult update(@RequestBody EasSysPermission permission){
|
|
|
Boolean ret = easPermissionService.update(permission);
|