接口 RoleApi


  • @Validated
    public interface RoleApi
    从以下版本开始:
    9.6.0
    作者:
    dingzhaojun, qinman, mengjuhua
    Date:
    2022/2/10
    • 方法概要

      所有方法 实例方法 抽象方法 
      修饰符和类型 方法 说明
      net.risesoft.pojo.Y9Result<Object> addPerson​(@NotBlank String personId, @NotBlank String roleId, @NotBlank String tenantId)
      添加人员到角色
      net.risesoft.pojo.Y9Result<net.risesoft.model.platform.Role> createRole​(String roleId, String roleName, String parentId, String customId, net.risesoft.enums.platform.RoleTypeEnum type, String systemName, String systemCnName)
      新增角色节点
      net.risesoft.pojo.Y9Result<Object> deleteRole​(@NotBlank String roleId)
      删除角色
      net.risesoft.pojo.Y9Result<net.risesoft.model.platform.Role> findByCustomIdAndParentId​(@NotBlank String customId, @NotBlank String parentId)
      根据customId和parentId查找角色对象
      net.risesoft.pojo.Y9Result<net.risesoft.model.platform.Role> getRole​(@NotBlank String roleId)
      根据id获取相应角色节点
      net.risesoft.pojo.Y9Result<List<net.risesoft.model.platform.OrgUnit>> listOrgUnitsById​(@NotBlank String tenantId, @NotBlank String roleId, net.risesoft.enums.platform.OrgTypeEnum orgType)
      根据角色Id获取关联的组织节点集合
      net.risesoft.pojo.Y9Result<List<net.risesoft.model.platform.Person>> listPersonsById​(@NotBlank String tenantId, @NotBlank String roleId)
      根据角色Id获取直接关联的人员对象集合
      net.risesoft.pojo.Y9Result<List<net.risesoft.model.platform.Role>> listRoleByParentId​(@NotBlank String roleId)
      根据父节点Id获取相应子级角色节点
      net.risesoft.pojo.Y9Result<Object> removePerson​(@NotBlank String personId, @NotBlank String roleId, @NotBlank String tenantId)
      删除角色关联的人员
    • 方法详细资料

      • addPerson

        @PostMapping("/addPerson")
        net.risesoft.pojo.Y9Result<Object> addPerson​(@RequestParam("personId") @NotBlank
                                                     @NotBlank String personId,
                                                     @RequestParam("roleId") @NotBlank
                                                     @NotBlank String roleId,
                                                     @RequestParam("tenantId") @NotBlank
                                                     @NotBlank String tenantId)
        添加人员到角色
        参数:
        personId - 人员id
        roleId - 角色id
        tenantId - 人员所在的租户id
        返回:
        Y9Result<Object> 通用请求返回对象 - success 属性判断操作是否成功
        从以下版本开始:
        9.6.0
      • createRole

        @PostMapping("/createRole")
        net.risesoft.pojo.Y9Result<net.risesoft.model.platform.Role> createRole​(@RequestParam("roleId")
                                                                                String roleId,
                                                                                @RequestParam("roleName")
                                                                                String roleName,
                                                                                @RequestParam("parentId")
                                                                                String parentId,
                                                                                @RequestParam("customId")
                                                                                String customId,
                                                                                @RequestParam("type")
                                                                                net.risesoft.enums.platform.RoleTypeEnum type,
                                                                                @RequestParam("systemName")
                                                                                String systemName,
                                                                                @RequestParam("systemCnName")
                                                                                String systemCnName)
        新增角色节点
        参数:
        roleId - 角色id
        roleName - 角色名称
        parentId - 父节点id
        customId - 自定义id
        type - 角色类型,node或者role
        systemName - 系统标识
        systemCnName - 系统中文名称
        返回:
        Y9Result<Role> 通用请求返回对象 - data 是保存的角色对象
        从以下版本开始:
        9.6.0
      • deleteRole

        @PostMapping("/deleteRole")
        net.risesoft.pojo.Y9Result<Object> deleteRole​(@RequestParam("roleId") @NotBlank
                                                      @NotBlank String roleId)
        删除角色
        参数:
        roleId - 角色id
        返回:
        Y9Result<Object> 通用请求返回对象 - success 属性判断操作是否成功
        从以下版本开始:
        9.6.0
      • findByCustomIdAndParentId

        @GetMapping("/findByCustomIdAndParentId")
        net.risesoft.pojo.Y9Result<net.risesoft.model.platform.Role> findByCustomIdAndParentId​(@RequestParam("customId") @NotBlank
                                                                                               @NotBlank String customId,
                                                                                               @RequestParam("parentId") @NotBlank
                                                                                               @NotBlank String parentId)
        根据customId和parentId查找角色对象
        参数:
        customId - customId
        parentId - 角色的父节点id
        返回:
        Y9Result<Role> 通用请求返回对象 - data 是角色对象
        从以下版本开始:
        9.6.0
      • getRole

        @GetMapping("/getRole")
        net.risesoft.pojo.Y9Result<net.risesoft.model.platform.Role> getRole​(@RequestParam("roleId") @NotBlank
                                                                             @NotBlank String roleId)
        根据id获取相应角色节点
        参数:
        roleId - 角色唯一标识
        返回:
        Y9Result<Role> 通用请求返回对象 - data 是角色对象
        从以下版本开始:
        9.6.0
      • listOrgUnitsById

        @GetMapping("/listOrgUnitsById")
        net.risesoft.pojo.Y9Result<List<net.risesoft.model.platform.OrgUnit>> listOrgUnitsById​(@RequestParam("tenantId") @NotBlank
                                                                                               @NotBlank String tenantId,
                                                                                               @RequestParam("roleId") @NotBlank
                                                                                               @NotBlank String roleId,
                                                                                               @RequestParam("orgType")
                                                                                               net.risesoft.enums.platform.OrgTypeEnum orgType)
        根据角色Id获取关联的组织节点集合
        参数:
        tenantId - 租户id
        roleId - 角色唯一标识
        orgType - 数据类型
        返回:
        Y9Result<List<OrgUnit>> 通用请求返回对象 - data 是组织节点集合
        从以下版本开始:
        9.6.0
      • listPersonsById

        @GetMapping("/listPersonsById")
        net.risesoft.pojo.Y9Result<List<net.risesoft.model.platform.Person>> listPersonsById​(@RequestParam("tenantId") @NotBlank
                                                                                             @NotBlank String tenantId,
                                                                                             @RequestParam("roleId") @NotBlank
                                                                                             @NotBlank String roleId)
        根据角色Id获取直接关联的人员对象集合
        参数:
        tenantId - 租户id
        roleId - 角色唯一标识
        返回:
        Y9Result<List<Person>> 通用请求返回对象 - data 是人员对象集合
        从以下版本开始:
        9.6.0
      • listRoleByParentId

        @GetMapping("/listRoleByParentId")
        net.risesoft.pojo.Y9Result<List<net.risesoft.model.platform.Role>> listRoleByParentId​(@RequestParam("roleId") @NotBlank
                                                                                              @NotBlank String roleId)
        根据父节点Id获取相应子级角色节点
        参数:
        roleId - 角色唯一标识
        返回:
        Y9Result<List<Role>> 通用请求返回对象 - data 是角色对象集合
        从以下版本开始:
        9.6.0
      • removePerson

        @PostMapping("/removePerson")
        net.risesoft.pojo.Y9Result<Object> removePerson​(@RequestParam("personId") @NotBlank
                                                        @NotBlank String personId,
                                                        @RequestParam("roleId") @NotBlank
                                                        @NotBlank String roleId,
                                                        @RequestParam("tenantId") @NotBlank
                                                        @NotBlank String tenantId)
        删除角色关联的人员
        参数:
        personId - 人员id
        roleId - 角色id
        tenantId - 人员所在的租户id
        返回:
        Y9Result<Object> 通用请求返回对象 - success 属性判断操作是否成功
        从以下版本开始:
        9.6.0