fix bug
This commit is contained in:
parent
0b44d32c26
commit
9907742993
@ -1,5 +1,14 @@
|
||||
package cn.axzo.tyr.client.model.res;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class IsSuperAdminRes {
|
||||
|
||||
Long identityId;
|
||||
|
||||
@ -71,7 +71,7 @@ public class SaasRoleController implements TyrSaasRoleApi {
|
||||
|
||||
@Override
|
||||
public ApiResult<List<IsSuperAdminRes>> isSuperAdmin(List<QueryByIdentityIdTypeReq> req) {
|
||||
return null;
|
||||
return ApiResult.ok(roleService.isSuperAdmin(req));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package cn.axzo.tyr.server.service;
|
||||
|
||||
import cn.axzo.tyr.client.model.req.QueryByIdentityIdTypeReq;
|
||||
import cn.axzo.tyr.client.model.req.QuerySaasRoleReq;
|
||||
import cn.axzo.tyr.client.model.res.IsSuperAdminRes;
|
||||
import cn.axzo.tyr.client.model.res.QueryBatchByIdentityIdTypeRes;
|
||||
import cn.axzo.tyr.client.model.vo.SaasRoleVO;
|
||||
import cn.axzo.tyr.client.model.vo.SaveOrUpdateRoleVO;
|
||||
@ -26,4 +27,6 @@ public interface RoleService {
|
||||
List<QueryBatchByIdentityIdTypeRes> queryBatchByIdentityIdType(List<QueryByIdentityIdTypeReq> req);
|
||||
|
||||
Long saveOrUpdate(SaveOrUpdateRoleVO saveOrUpdateRole);
|
||||
|
||||
List<IsSuperAdminRes> isSuperAdmin(List<QueryByIdentityIdTypeReq> req);
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ import cn.axzo.tyr.client.model.req.QueryByIdentityIdTypeReq;
|
||||
import cn.axzo.tyr.client.model.req.QuerySaasPermissionGroupReq;
|
||||
import cn.axzo.tyr.client.model.req.QuerySaasRoleGroupReq;
|
||||
import cn.axzo.tyr.client.model.req.QuerySaasRoleReq;
|
||||
import cn.axzo.tyr.client.model.res.IsSuperAdminRes;
|
||||
import cn.axzo.tyr.client.model.res.QueryBatchByIdentityIdTypeRes;
|
||||
import cn.axzo.tyr.client.model.vo.SaasPermissionGroupVO;
|
||||
import cn.axzo.tyr.client.model.vo.SaasRoleVO;
|
||||
@ -244,6 +245,21 @@ public class RoleServiceImpl implements RoleService {
|
||||
return saasRole.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IsSuperAdminRes> isSuperAdmin(List<QueryByIdentityIdTypeReq> req) {
|
||||
List<IsSuperAdminRes> result = new ArrayList<>();
|
||||
req.forEach(e -> {
|
||||
// result.add(QueryBatchByIdentityIdTypeRes.builder()
|
||||
// .identityId(e.getIdentityId())
|
||||
// .identityType(e.getIdentityType())
|
||||
// .workspaceId(e.getWorkspaceId())
|
||||
// .ouId(e.getOuId())
|
||||
// .role(queryByIdentityIdType(e.getIdentityId(),e.getIdentityType(),e.getWorkspaceId(),e.getOuId()))
|
||||
// .build());
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
private SaasRole validAndBuildRole(SaveOrUpdateRoleVO saveOrUpdateRole, Date now) {
|
||||
SaasRole saasRole;
|
||||
if (Objects.isNull(saveOrUpdateRole.getId())) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user