| | |
| | | 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; |
| | |
| | | }); |
| | | } |
| | | |
| | | @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 生效问题 |
| | | * |
| | |
| | | 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; |
| | | } |
| | | |
| | | } |