feat: WorkspaceJoinType

使用int入参
This commit is contained in:
TanJ 2023-10-17 14:32:37 +08:00
parent 25d6fb13a9
commit 036809191c
3 changed files with 6 additions and 3 deletions

View File

@ -19,6 +19,7 @@ import java.util.EnumSet;
* @date 2023/10/13 17:55
*/
@AllArgsConstructor
@Getter
public enum WorkspaceJoinType implements IBaseCreateEnum<WorkspaceJoinType> {
PRIMARY_CONTRACTING_UNIT(1, "总包单位"),
@ -30,7 +31,6 @@ public enum WorkspaceJoinType implements IBaseCreateEnum<WorkspaceJoinType> {
ENT_GENERAL(7, "企业通用"),
;
@EnumValue
@Getter
@JsonValue
private final Integer value;
private final String desc;

View File

@ -72,8 +72,11 @@ public class IdentityAuthReq {
@NotNull
private Long ouId;
/**
* 使用{@link WorkspaceJoinType}
*/
@NotNull
private WorkspaceJoinType workspaceJoinType;
private Integer workspaceJoinType;
}
}

View File

@ -329,7 +329,7 @@ public class TyrSaasAuthServiceImpl implements TyrSaasAuthService {
userRoleInfoMap.setWorkspaceId(e.getWorkspaceId());
userRoleInfoMap.setOuId(e.getOuId());
userRoleInfoMap.setWorkspaceType(e.getWorkspaceType());
userRoleInfoMap.setWorkspaceJoinType(e.getWorkspaceJoinType());
userRoleInfoMap.setWorkspaceJoinType(WorkspaceJoinType.matchValue(e.getWorkspaceJoinType()));
queryKey.putIfAbsent(KeyUtil.buildKeyBySeparator(e.getWorkspaceId(), e.getOuId()), userRoleInfoMap);
});
stopWatch.start("query role user relation");