add - 新增通过工作台 id 查询权限点

This commit is contained in:
wangli 2023-10-18 16:20:04 +08:00
parent 2d366e4500
commit 10cdd20b93
3 changed files with 18 additions and 3 deletions

View File

@ -21,6 +21,8 @@ import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Set;
/** /**
* 产品相关 API * 产品相关 API
@ -102,4 +104,12 @@ public interface ProductApi {
*/ */
@PostMapping("api/auth/product/feature/relation/update") @PostMapping("api/auth/product/feature/relation/update")
ApiResult<Boolean> updateFeatureRelation(@Validated @RequestBody List<ProductFeatureRelationUpdateReq> req); ApiResult<Boolean> updateFeatureRelation(@Validated @RequestBody List<ProductFeatureRelationUpdateReq> req);
/**
* 查询指定工作台关联的服务包下的产品权限点
*
* @param workspaceIds
* @return
*/
ApiResult<Map<Long, List<ProductFeatureRelationVO>>> queryProductFeatureRelationByWorkspace(Set<Long> workspaceIds);
} }

View File

@ -2,11 +2,8 @@ package cn.axzo.tyr.client.model.product;
import cn.axzo.core.domain.PageRequest; import cn.axzo.core.domain.PageRequest;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
/** /**

View File

@ -20,6 +20,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Set;
/** /**
* 产品相关 API 实现 * 产品相关 API 实现
@ -124,4 +126,10 @@ public class ProductController implements ProductApi {
} }
return productFeatureRelationService.updateFeatureRelation(req); return productFeatureRelationService.updateFeatureRelation(req);
} }
@Override
public ApiResult<Map<Long, List<ProductFeatureRelationVO>>> queryProductFeatureRelationByWorkspace(Set<Long> workspaceIds) {
return ApiResult.ok(productFeatureRelationService.getByWorkspace(workspaceIds));
}
} }