lxw
2022-09-01 fac6a178e60cc78178b70556c260dde47e806cc0
src/main/java/com/whyc/controller/PermitGroupController.java
@@ -4,10 +4,7 @@
import com.whyc.pojo.DocUser;
import com.whyc.pojo.PermitGroup;
import com.whyc.pojo.UserGroup;
import com.whyc.service.CategoryService;
import com.whyc.service.GroupService;
import com.whyc.service.PermitGroupService;
import com.whyc.service.PermitService;
import com.whyc.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@@ -24,6 +21,10 @@
    @Autowired
    private PermitService permitService;
    @Autowired
    private DocUserService docUserService;
    @Autowired
    private CategoryService categoryService;
@@ -43,6 +44,12 @@
        return  groupService.getAllGroup();
    }
    @ApiOperation(value = "登录后根据用户名查询该用户的权限")
    @GetMapping("getPermitsByUname")
    public Response getPermitsByUname(){
        return  permitService.getPermitsByUname();
    }
    @ApiOperation(value = "添加权限组")
    @GetMapping("addGroup")
    public Response addGroup(@RequestParam String groupName){
@@ -60,7 +67,11 @@
    public Response updateGroup(@RequestParam String groupId,@RequestParam String groupName){
        return  groupService.updateGroup(groupId,groupName);
    }
    @ApiOperation(value = "查询所有用户")
    @GetMapping("getAllDocUser")
    public Response getAllDocUser(){
        return  docUserService.getAllDocUser();
    }
    @ApiOperation(value = "权限组下加用户")
    @PostMapping("addUserToGroup")
    public Response addUserToGroup(@RequestBody List<UserGroup> users){