Browse Source

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_freeway into feature_v1.0

tags/v1.2.0^2
chengwang 1 year ago
parent
commit
75338b8124
2 changed files with 9 additions and 2 deletions
  1. +5
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/oidc/OidcServiceImpl.java
  2. +4
    -1
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/MenuMapper.xml

+ 5
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/oidc/OidcServiceImpl.java View File

@@ -7,7 +7,9 @@ import com.tuoheng.admin.query.RoleClientQuery;
import com.tuoheng.admin.request.third.oidc.CreateOidcTenantRequest;
import com.tuoheng.admin.request.third.oidc.DeletedOidcTenantRequest;
import com.tuoheng.admin.request.third.oidc.EditOidcTenantRequest;
import com.tuoheng.admin.service.permissions.OpPermissionsService;
import com.tuoheng.admin.service.role.IRoleService;
import com.tuoheng.admin.service.role.OpRolePermissionService;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -37,6 +39,8 @@ public class OidcServiceImpl implements OidcService {

@Autowired
private IRoleService roleService;
@Autowired
private OpPermissionsService opPermissionsService;


public JsonResult addUser(User user, String password, Tenant tenant) {
@@ -89,6 +93,6 @@ public class OidcServiceImpl implements OidcService {

RoleClientQuery query = new RoleClientQuery();
query.setRoleId(roleId);
return roleService.getMenuList(query);
return opPermissionsService.getRolePermissionByRoleId(query);
}
}

+ 4
- 1
tuoheng-service/tuoheng-admin/src/main/resources/mapper/MenuMapper.xml View File

@@ -32,7 +32,10 @@
select
<include refid="Base_Column_List"/>
from op_menus
where mark = 1 and parent_id = 0 and client_id = #{clientId}
where mark = 1 and parent_id = 0
<if test="clientId != null and clientId !=''">
and client_id = #{clientId}
</if>
and status = 1
and id in (select menu_id from op_role_menu where role_id = #{roleId} and mark = 1)
order by sort asc

Loading…
Cancel
Save