feat(server): 修改查询企业工作台超级管理员
This commit is contained in:
parent
34481efaa5
commit
e3d92f404f
@ -8,7 +8,6 @@ import cn.axzo.tyr.client.model.req.RoleWithUserQueryReq;
|
||||
import cn.axzo.tyr.server.repository.entity.SaasRole;
|
||||
import cn.axzo.tyr.server.repository.entity.SaasRoleWithUser;
|
||||
import cn.axzo.tyr.server.repository.mapper.SaasRoleMapper;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -61,16 +60,12 @@ public class SaasRoleDao extends ServiceImpl<SaasRoleMapper, SaasRole> {
|
||||
|
||||
public SaasRole findRoleByTypeAndWorkspaceIdAndOuId(String roleType, Long workspaceId,
|
||||
Long ouId) {
|
||||
List<SaasRole> list = this.lambdaQuery()
|
||||
return this.lambdaQuery()
|
||||
.eq(SaasRole::getRoleType, roleType)
|
||||
.eq(SaasRole::getWorkspaceId, workspaceId)
|
||||
.eq(SaasRole::getOwnerOuId, ouId)
|
||||
.eq(SaasRole::getIsDelete, TableIsDeleteEnum.NORMAL.value)
|
||||
.list();
|
||||
if(CollUtil.isEmpty(list)){
|
||||
return null;
|
||||
}
|
||||
return list.get(0);
|
||||
.last(" limit 1").one();
|
||||
}
|
||||
|
||||
public List<SaasRole> listCommonRoleByNameAndWorkspaceIdAndOuId(String name, Long workspaceId,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user