huanghongfa
2020-12-24 40529f7d2cadd71c72cb89c7f79046a8ff689df5
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/RoleApi.java
@@ -2,11 +2,9 @@
import com.panzhihua.common.model.vos.MenuVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.user.RoleVO;
import com.panzhihua.service_user.service.RoleService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@@ -51,4 +49,34 @@
    public R listIdentity(@RequestParam("communityId")Integer communityId){
        return roleService.listIdentity(communityId);
    }
    /**
     * 角色下拉列表
     * @param communityId 对应社区 0 表示运营后台
     * @return 角色集合
     */
    @PostMapping("listrolebackstage")
    public R listRoleBackstage(@RequestParam("communityId") Long communityId){
        return roleService.listRoleBackstage(communityId);
    }
    /**
     * 新增角色
     * @param roleVO 角色信息
     * @return 新增结果
     */
    @PostMapping("addrolebackstage")
    public R addRoleBackstage(@RequestBody RoleVO roleVO){
        return roleService.addRoleBackstage(roleVO);
    }
    /**
     * 删除角色
     * @param roleVO 角色主键
     * @return 删除结果
     */
    @PostMapping("deleterolebackstage")
    public R deleteRoleBackstage(@RequestBody RoleVO roleVO){
        return roleService.deleteRoleBackstage(roleVO);
    }
}