From b8a0affd03b5fa9fa33cd6f870e90394c2df86c7 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期一, 06 一月 2025 13:31:07 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/service/permission/RoleServiceImpl.java | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/service/permission/RoleServiceImpl.java b/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/service/permission/RoleServiceImpl.java index e512895..d77d9b3 100644 --- a/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/service/permission/RoleServiceImpl.java +++ b/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/service/permission/RoleServiceImpl.java @@ -8,6 +8,7 @@ import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.util.collection.CollectionUtils; import com.iailab.framework.common.util.object.BeanUtils; +import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX; import com.iailab.module.system.controller.admin.permission.vo.role.RolePageReqVO; import com.iailab.module.system.controller.admin.permission.vo.role.RoleSaveReqVO; import com.iailab.module.system.dal.dataobject.permission.RoleDO; @@ -249,6 +250,16 @@ }); } + @Override + public RoleDO getRoleByName(String name) { + return roleMapper.selectOne(new LambdaQueryWrapperX<RoleDO>().eq(RoleDO::getName, name)); + } + + @Override + public void insert(RoleDO role) { + roleMapper.insert(role); + } + /** * 获得自身的代理对象,解决 AOP 生效问题 * @@ -258,4 +269,12 @@ return SpringUtil.getBean(getClass()); } + /** + * 查询租户管理员 + */ + public RoleDO getTenantAdminRole(Long tenantId) { + RoleDO roleDO = roleMapper.selectOne(new LambdaQueryWrapperX<RoleDO>().eq(RoleDO::getType, 1L).eq(RoleDO::getTenantId, tenantId)); + return roleDO; + } + } -- Gitblit v1.9.3