feat:(REQ-2227) 角色tree接口增加workspaceType

This commit is contained in:
lilong 2024-04-12 14:14:34 +08:00
parent 6b47280781
commit 7ded370e51
2 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,8 @@ public class RoleTreeRes {
*/ */
private String workspaceTypeCode; private String workspaceTypeCode;
private String workspaceType;
/** /**
* 名字 * 名字
*/ */

View File

@ -5,6 +5,7 @@ import cn.axzo.framework.domain.web.result.ApiListResult;
import cn.axzo.framework.domain.web.result.ApiPageResult; import cn.axzo.framework.domain.web.result.ApiPageResult;
import cn.axzo.framework.domain.web.result.ApiResult; import cn.axzo.framework.domain.web.result.ApiResult;
import cn.axzo.tyr.client.feign.TyrSaasRoleApi; import cn.axzo.tyr.client.feign.TyrSaasRoleApi;
import cn.axzo.tyr.client.model.enums.DictWorkSpaceTypeEnum;
import cn.axzo.tyr.client.model.req.ChangeGroupLeaderRoleReq; import cn.axzo.tyr.client.model.req.ChangeGroupLeaderRoleReq;
import cn.axzo.tyr.client.model.req.CommonDictQueryReq; import cn.axzo.tyr.client.model.req.CommonDictQueryReq;
import cn.axzo.tyr.client.model.req.FeatureRoleRelationReq; import cn.axzo.tyr.client.model.req.FeatureRoleRelationReq;
@ -197,6 +198,7 @@ public class SaasRoleController implements TyrSaasRoleApi {
// 因为根节点在roleGroup里面没有都是workspaceTypeCode描述是放在字典表里 // 因为根节点在roleGroup里面没有都是workspaceTypeCode描述是放在字典表里
List<CommonDictResp> commonDicts = listRootRole(req); List<CommonDictResp> commonDicts = listRootRole(req);
List<RoleTreeRes> roots = commonDicts.stream() List<RoleTreeRes> roots = commonDicts.stream()
.map(e -> RoleTreeRes.builder() .map(e -> RoleTreeRes.builder()
.id(e.getId()) .id(e.getId())
@ -204,6 +206,7 @@ public class SaasRoleController implements TyrSaasRoleApi {
.name(e.getDictValue()) .name(e.getDictValue())
.type(ROOT_TYPE) .type(ROOT_TYPE)
.idStr(e.getId() + ":" + ROOT_TYPE) .idStr(e.getId() + ":" + ROOT_TYPE)
.workspaceType(DictWorkSpaceTypeEnum.getByValueWorkspaceType(Integer.valueOf(e.getDictCode())).getValue())
.build()) .build())
.collect(Collectors.toList()); .collect(Collectors.toList());