src/main/java/com/sums/controller/RoleController.java
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.sums.controller;
import com.sums.annotations.PermissionVerify;
import com.sums.entity.ReturnResult;
import com.sums.entity.Role;
import com.sums.service.RoleService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Arrays;
import java.util.List;
/**
* <p>
* 前端控制器
* </p>
*
* @author tonghui
* @since 2022-02-13
*/
@Controller
public class RoleController {
@Autowired
private RoleService service;
/**
* 角色页
* @return
*/
@PermissionVerify(value ="system:role:role")
@GetMapping("/role")
public String roleView(){
return "studentUnion/role";
}
/**展示角色信息*/
@PermissionVerify(value ="system:role:all")
@GetMapping("/roleFind/all")
@ResponseBody
public Object foleFindAll(int page,int limit){
return service.pageRole(page, limit);
}
/**添加角色*/
@PermissionVerify(value ="system:role:add")
@PostMapping("/add/role")
@ResponseBody
public Object addRole(Role role){
return service.addRole(role);
}
/**删除角色*/
@PermissionVerify(value ="system:role:del")
@PostMapping("/del/role")
后面还有 24 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。