|
|
@@ -1,8 +1,10 @@ |
|
|
|
package com.tuoheng.admin.service.third.oidc; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.IService; |
|
|
|
import com.tuoheng.admin.dto.RolePermissionDto; |
|
|
|
import com.tuoheng.admin.entity.Tenant; |
|
|
|
import com.tuoheng.admin.entity.User; |
|
|
|
import com.tuoheng.admin.mapper.MenuMapper; |
|
|
|
import com.tuoheng.admin.query.RoleClientQuery; |
|
|
|
import com.tuoheng.admin.request.third.oidc.CreateOidcTenantRequest; |
|
|
|
import com.tuoheng.admin.request.third.oidc.DeletedOidcTenantRequest; |
|
|
@@ -40,7 +42,7 @@ public class OidcServiceImpl implements OidcService { |
|
|
|
@Autowired |
|
|
|
private IRoleService roleService; |
|
|
|
@Autowired |
|
|
|
private OpPermissionsService opPermissionsService; |
|
|
|
private MenuMapper menuMapper; |
|
|
|
|
|
|
|
|
|
|
|
public JsonResult addUser(User user, String password, Tenant tenant) { |
|
|
@@ -83,16 +85,16 @@ public class OidcServiceImpl implements OidcService { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取角色对应的菜单 |
|
|
|
* 查询角色对应的菜单 |
|
|
|
* |
|
|
|
* @param roleId |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public JsonResult getMenuList(Integer roleId) { |
|
|
|
|
|
|
|
RoleClientQuery query = new RoleClientQuery(); |
|
|
|
query.setRoleId(roleId); |
|
|
|
return opPermissionsService.getRolePermissionByRoleId(query); |
|
|
|
RolePermissionDto rolePermissionDto = new RolePermissionDto(); |
|
|
|
rolePermissionDto.setOpMenusList(menuMapper.getMenuListByRoleId(roleId)); |
|
|
|
rolePermissionDto.setRoleId(roleId); |
|
|
|
return JsonResult.success(rolePermissionDto); |
|
|
|
} |
|
|
|
} |