接口 ResourceApi


  • @Validated
    public interface ResourceApi
    资源管理组件
    从以下版本开始:
    9.6.0
    作者:
    dingzhaojun, qinman, mengjuhua
    Date:
    2022/2/10
    • 方法概要

      所有方法 实例方法 抽象方法 
      修饰符和类型 方法 说明
      net.risesoft.pojo.Y9Result<net.risesoft.model.platform.Resource> createMenuResource​(@NotBlank String resourceId, @NotBlank String resourceName, @NotBlank String parentResourceId, @NotBlank String customId)
      创建菜单资源
      net.risesoft.pojo.Y9Result<net.risesoft.model.platform.Resource> findByCustomIdAndParentId​(@NotBlank String customId, @NotBlank String parentId, net.risesoft.enums.platform.ResourceTypeEnum resourceType)
      根据customId和parentId获取资源
      net.risesoft.pojo.Y9Result<net.risesoft.model.platform.Resource> getParentResource​(@NotBlank String resourceId)
      获得指定资源的父资源
      net.risesoft.pojo.Y9Result<net.risesoft.model.platform.Resource> getResource​(@NotBlank String resourceId)
      根据id获取资源对象
      net.risesoft.pojo.Y9Result<List<net.risesoft.model.platform.Resource>> listSubMenus​(@NotBlank String resourceId)
      获取指定资源的子菜单资源
      net.risesoft.pojo.Y9Result<List<net.risesoft.model.platform.Resource>> listSubResources​(@NotBlank String resourceId)
      获得指定资源的子资源
    • 方法详细资料

      • createMenuResource

        @PostMapping("/createMenuResource")
        net.risesoft.pojo.Y9Result<net.risesoft.model.platform.Resource> createMenuResource​(@RequestParam("resourceId") @NotBlank
                                                                                            @NotBlank String resourceId,
                                                                                            @RequestParam("resourceName") @NotBlank
                                                                                            @NotBlank String resourceName,
                                                                                            @RequestParam("parentResourceId") @NotBlank
                                                                                            @NotBlank String parentResourceId,
                                                                                            @RequestParam("customId") @NotBlank
                                                                                            @NotBlank String customId)
        创建菜单资源
        参数:
        resourceId - 资源id
        resourceName - 资源名称
        parentResourceId - 父资源id
        customId - 自定义标识
        返回:
        Y9Result<Resource> 通用请求返回对象 - data 是新创建的菜单资源对象
        从以下版本开始:
        9.6.0
      • findByCustomIdAndParentId

        @GetMapping("/findByCustomIdAndParentId")
        net.risesoft.pojo.Y9Result<net.risesoft.model.platform.Resource> findByCustomIdAndParentId​(@RequestParam("customId") @NotBlank
                                                                                                   @NotBlank String customId,
                                                                                                   @RequestParam("parentId") @NotBlank
                                                                                                   @NotBlank String parentId,
                                                                                                   @RequestParam("resourceType")
                                                                                                   net.risesoft.enums.platform.ResourceTypeEnum resourceType)
        根据customId和parentId获取资源
        参数:
        customId - 自定义id
        parentId - 资源id
        resourceType - 资源类型 ResourceTypeEnum
        返回:
        Y9Result<Resource> 通用请求返回对象 - data 是资源对象
        从以下版本开始:
        9.6.0
      • getParentResource

        @GetMapping("/getParentResource")
        net.risesoft.pojo.Y9Result<net.risesoft.model.platform.Resource> getParentResource​(@RequestParam("resourceId") @NotBlank
                                                                                           @NotBlank String resourceId)
        获得指定资源的父资源
        参数:
        resourceId - :资源的唯一标识
        返回:
        Y9Result<Resource> 通用请求返回对象 - data 是父资源对象
        从以下版本开始:
        9.6.0
      • getResource

        @GetMapping("/getResource")
        net.risesoft.pojo.Y9Result<net.risesoft.model.platform.Resource> getResource​(@RequestParam("resourceId") @NotBlank
                                                                                     @NotBlank String resourceId)
        根据id获取资源对象
        参数:
        resourceId - 资源唯一标示
        返回:
        Y9Result<Resource> 通用请求返回对象 - data 是资源对象
        从以下版本开始:
        9.6.0
      • listSubMenus

        @GetMapping("/listSubMenus")
        net.risesoft.pojo.Y9Result<List<net.risesoft.model.platform.Resource>> listSubMenus​(@RequestParam("resourceId") @NotBlank
                                                                                            @NotBlank String resourceId)
        获取指定资源的子菜单资源
        参数:
        resourceId - 资源id
        返回:
        Y9Result<List<Resource>> 通用请求返回对象 - data 是资源对象集合
        从以下版本开始:
        9.6.0
      • listSubResources

        @GetMapping("/listSubResources")
        net.risesoft.pojo.Y9Result<List<net.risesoft.model.platform.Resource>> listSubResources​(@RequestParam("resourceId") @NotBlank
                                                                                                @NotBlank String resourceId)
        获得指定资源的子资源
        参数:
        resourceId - 资源唯一标识
        返回:
        Y9Result<List<Resource>> 通用请求返回对象 - data 是资源对象集合
        从以下版本开始:
        9.6.0