feature(permission-query): 修复请求转换

This commit is contained in:
zhansihu 2023-10-24 10:48:39 +08:00
parent 4f7d992a25
commit 46e34e0876
2 changed files with 7 additions and 0 deletions

View File

@ -16,6 +16,9 @@ public class OUWorkspacePair {
/** 工作台ID **/
@NotNull
private Long workspaceId;
/** 工作台类型 **/
@NotNull
private Integer workspaceType;
/** 企业组织ID **/
@NotNull
private Long ouId;

View File

@ -58,6 +58,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@ -517,6 +519,8 @@ public class TyrSaasAuthServiceImpl implements TyrSaasAuthService {
if (StrUtil.isNotBlank(req.getTerminal())) {
request.setTerminal(Collections.singletonList(req.getTerminal()));
}
List<IdentityAuthReq.WorkspaceOuPair> pairs = BeanMapper.copyList(req.getWorkspaceAndOU(), IdentityAuthReq.WorkspaceOuPair.class);
request.setWorkspaceOusPairs(pairs);
IdentityAuthRes authRes = this.findIdentityAuth(request);
HashSet<String> codeSet = new HashSet<>(req.getCodes());
//比较code