feat:(REQ-3282) 去掉已经废弃的代码

This commit is contained in:
李龙 2024-12-18 14:35:06 +08:00
parent bbc702dcd4
commit 55a64d39b9
3 changed files with 0 additions and 44 deletions

View File

@ -60,27 +60,6 @@ public class SaasRoleDao extends ServiceImpl<SaasRoleMapper, SaasRole> {
return this.getBaseMapper().listRoleUserByPermissionGroup(permissionGroupIdList, workspaceIds);
}
public SaasRole findRoleByTypeAndWorkspaceIdAndOuId(String roleType, Long workspaceId,
Long ouId) {
return this.lambdaQuery()
.eq(SaasRole::getRoleType, roleType)
.eq(SaasRole::getWorkspaceId, workspaceId)
.eq(SaasRole::getOwnerOuId, ouId)
.eq(SaasRole::getIsDelete, TableIsDeleteEnum.NORMAL.value)
.last(" limit 1").one();
}
public List<SaasRole> listCommonRoleByNameAndWorkspaceIdAndOuId(String name, Long workspaceId,
Long ouId) {
return lambdaQuery().eq(SaasRole::getName, name)
.eq(SaasRole::getWorkspaceId, workspaceId)
.eq(SaasRole::getOwnerOuId, ouId)
.eq(SaasRole::getRoleType, RoleTypeEnum.COMMON.getValue())
.eq(SaasRole::getIsDelete, TableIsDeleteEnum.NORMAL.value)
.select(SaasRole::getId)
.list();
}
public List<SaasRole> findRoleByName(Long ouId, Long workspaceId,List<Long> roleIds,
List<String> roleNames) {
return this.lambdaQuery().select(SaasRole::getId, SaasRole::getName, SaasRole::getRoleType)

View File

@ -54,13 +54,6 @@ public class SaasRoleGroupDao extends ServiceImpl<SaasRoleGroupMapper, SaasRoleG
.update();
}
/** 弃用category_code 通过角色组层级实现 **/
@Deprecated
public List<SaasRoleGroup> listByCategoryCode(List<String> categoryCode) {
return lambdaQuery().eq(BaseEntity::getIsDelete, 0L)
.in(SaasRoleGroup::getCategoryCode, categoryCode).list();
}
public List<SaasRoleGroup> listByCodes(List<String> codes) {
return lambdaQuery().eq(BaseEntity::getIsDelete, 0L)
.in(SaasRoleGroup::getCode, codes).list();

View File

@ -2,7 +2,6 @@ package cn.axzo.tyr.server.repository.dao;
import cn.axzo.basics.common.constant.enums.TableIsDeleteEnum;
import cn.axzo.karma.client.model.dto.ProjectWorkBaseDTO;
import cn.axzo.pokonyan.config.mybatisplus.BaseEntity;
import cn.axzo.tyr.client.model.BaseWorkspaceModel;
import cn.axzo.tyr.client.model.enums.IdentityType;
import cn.axzo.tyr.client.model.enums.SaasJobTypeEnum;
@ -32,16 +31,6 @@ public class SaasRoleUserRelationDao extends ServiceImpl<SaasRoleUserRelationMap
@Autowired
private SaasRoleUserRelationMapper saasRoleUserRelationMapper;
public List<SaasRoleUserRelation> query(Long identityId, Integer identityType, Long workspaceId, Long ouId) {
return this.lambdaQuery()
.eq(SaasRoleUserRelation::getIdentityId, identityId)
.eq(SaasRoleUserRelation::getIdentityType, identityType)
.eq(null != workspaceId, SaasRoleUserRelation::getWorkspaceId, workspaceId)
.eq(null != ouId, SaasRoleUserRelation::getOuId, ouId)
.eq(BaseEntity::getIsDelete, TableIsDeleteEnum.NORMAL.value)
.list();
}
public void deleteById(List<Long> ids) {
if (CollUtil.isEmpty(ids)) {
return;
@ -154,11 +143,6 @@ public class SaasRoleUserRelationDao extends ServiceImpl<SaasRoleUserRelationMap
public void delByIdentityAndWorkspaceIdAndOuId(Long identityId, cn.axzo.basics.profiles.common.enums.IdentityType identityType, Long workspaceId, Long ouId) {
getBaseMapper().deleteButNotAdminAndNotLeader(workspaceId, ouId, identityId, identityType, null);
// lambdaUpdate().eq(SaasRoleUserRelation::getWorkspaceId, workspaceId)
// .eq(SaasRoleUserRelation::getIdentityId, identityId)
// .eq(SaasRoleUserRelation::getIdentityType, identityType)
// .eq(SaasRoleUserRelation::getOuId, ouId)
// .set(SaasRoleUserRelation::getIsDelete, TableIsDeleteEnum.DELETE.value).update();
}
public List<SaasRoleUserRelation> findBathSuperAdmin(List<ProjectWorkBaseDTO> req) {