Merge branch 'feature/REQ-2935'

# Conflicts:
#	tyr-api/src/main/java/cn/axzo/tyr/client/model/req/PageSaasFeatureResourceReq.java
This commit is contained in:
lilong 2024-09-25 18:20:02 +08:00
commit b1c3989166
3 changed files with 23 additions and 0 deletions

View File

@ -1,11 +1,14 @@
package cn.axzo.tyr.client.feign; package cn.axzo.tyr.client.feign;
import cn.axzo.foundation.page.PageResp;
import cn.axzo.framework.domain.web.result.ApiResult; import cn.axzo.framework.domain.web.result.ApiResult;
import cn.axzo.tyr.client.model.req.DeleteFeatureResourceReq; import cn.axzo.tyr.client.model.req.DeleteFeatureResourceReq;
import cn.axzo.tyr.client.model.req.FeatureResourceTreeSaveReq; import cn.axzo.tyr.client.model.req.FeatureResourceTreeSaveReq;
import cn.axzo.tyr.client.model.req.GetFeatureResourceTreeReq; import cn.axzo.tyr.client.model.req.GetFeatureResourceTreeReq;
import cn.axzo.tyr.client.model.req.PageSaasFeatureResourceReq;
import cn.axzo.tyr.client.model.req.ResourceSyncReq; import cn.axzo.tyr.client.model.req.ResourceSyncReq;
import cn.axzo.tyr.client.model.res.FeatureResourceTreeNode; import cn.axzo.tyr.client.model.res.FeatureResourceTreeNode;
import cn.axzo.tyr.client.model.res.SaasFeatureResourceResp;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -64,4 +67,10 @@ public interface FeatureResourceApi {
/** 通过featureResourceIds查询对应的featureCode **/ /** 通过featureResourceIds查询对应的featureCode **/
@PostMapping("/api/featureResource/listFeatureCodeByFeatureResourceIds") @PostMapping("/api/featureResource/listFeatureCodeByFeatureResourceIds")
ApiResult<Map<Long, String>> listFeatureCodeByFeatureResourceIds(@RequestParam List<Long> featureResourceIds); ApiResult<Map<Long, String>> listFeatureCodeByFeatureResourceIds(@RequestParam List<Long> featureResourceIds);
@PostMapping("/api/featureResource/list")
ApiResult<List<SaasFeatureResourceResp>> list(@Validated @RequestBody PageSaasFeatureResourceReq param);
@PostMapping("/api/featureResource/page")
ApiResult<PageResp<SaasFeatureResourceResp>> page(@Validated @RequestBody PageSaasFeatureResourceReq param);
} }

View File

@ -156,6 +156,7 @@ public interface ProductApi {
* @param terminal 政务端 * @param terminal 政务端
* @return {@link GovernmentTerminalResp} * @return {@link GovernmentTerminalResp}
*/ */
@Deprecated
@GetMapping("api/auth/product/getGovernmentTerminal") @GetMapping("api/auth/product/getGovernmentTerminal")
ApiResult<List<GovernmentTerminalResp>> getGovernmentTerminal(@RequestParam @NotNull(message = "terminal不能为空") String terminal); ApiResult<List<GovernmentTerminalResp>> getGovernmentTerminal(@RequestParam @NotNull(message = "terminal不能为空") String terminal);

View File

@ -1,12 +1,15 @@
package cn.axzo.tyr.server.controller.permission; package cn.axzo.tyr.server.controller.permission;
import cn.axzo.foundation.page.PageResp;
import cn.axzo.framework.domain.web.result.ApiResult; import cn.axzo.framework.domain.web.result.ApiResult;
import cn.axzo.tyr.client.feign.FeatureResourceApi; import cn.axzo.tyr.client.feign.FeatureResourceApi;
import cn.axzo.tyr.client.model.req.DeleteFeatureResourceReq; import cn.axzo.tyr.client.model.req.DeleteFeatureResourceReq;
import cn.axzo.tyr.client.model.req.FeatureResourceTreeSaveReq; import cn.axzo.tyr.client.model.req.FeatureResourceTreeSaveReq;
import cn.axzo.tyr.client.model.req.GetFeatureResourceTreeReq; import cn.axzo.tyr.client.model.req.GetFeatureResourceTreeReq;
import cn.axzo.tyr.client.model.req.PageSaasFeatureResourceReq;
import cn.axzo.tyr.client.model.req.ResourceSyncReq; import cn.axzo.tyr.client.model.req.ResourceSyncReq;
import cn.axzo.tyr.client.model.res.FeatureResourceTreeNode; import cn.axzo.tyr.client.model.res.FeatureResourceTreeNode;
import cn.axzo.tyr.client.model.res.SaasFeatureResourceResp;
import cn.axzo.tyr.server.service.FeatureResourceSyncService; import cn.axzo.tyr.server.service.FeatureResourceSyncService;
import cn.axzo.tyr.server.service.SaasFeatureResourceService; import cn.axzo.tyr.server.service.SaasFeatureResourceService;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
@ -93,4 +96,14 @@ public class FeatureResourceController implements FeatureResourceApi {
public ApiResult<Map<Long, String>> listFeatureCodeByFeatureResourceIds(List<Long> featureResourceIds) { public ApiResult<Map<Long, String>> listFeatureCodeByFeatureResourceIds(List<Long> featureResourceIds) {
return ApiResult.ok(featureResourceSyncService.listFeatureCodeByFeatureResourceIds(featureResourceIds)); return ApiResult.ok(featureResourceSyncService.listFeatureCodeByFeatureResourceIds(featureResourceIds));
} }
@Override
public ApiResult<List<SaasFeatureResourceResp>> list(PageSaasFeatureResourceReq param) {
return ApiResult.ok(featureResourceService.list(param));
}
@Override
public ApiResult<PageResp<SaasFeatureResourceResp>> page(PageSaasFeatureResourceReq param) {
return ApiResult.ok(featureResourceService.page(param));
}
} }