Commit 4b5d53e8 by guojuxing

查询用户接口修复

parent c5cf2802
......@@ -108,7 +108,7 @@
select
a.role_id roleId,
a.role_name roleName,
(select count(b.user_id) from tab_sys_user_role b where a.role_id = b.role_id and b.status = 1 group by b.user_id) authUserCount
(select count(DISTINCT b.user_id) from tab_sys_user_role b where a.role_id = b.role_id and b.status = 1 ) authUserCount
from tab_sys_role a
where a.status = 1
and a.enterprise_id = #{enterpriseId}
......
......@@ -220,7 +220,7 @@
a.phone_number phoneNumber,
a.phone_area_code phoneAreaCode,
(select GROUP_CONCAT(role_name separator '/') from tab_sys_role where role_id in (GROUP_CONCAT(b.role_id))) userRoleNames,
(select GROUP_CONCAT(resource_name separator '/') from tab_sys_resource where resource_id in (GROUP_CONCAT(c.resource_id))) userResourceNames
(select GROUP_CONCAT(d.resource_name separator '/') from tab_sys_resource d WHERE find_in_set( d.resource_Id , GROUP_CONCAT(c.resource_id)) ) userResourceNames
from tab_sys_user a
left join tab_sys_user_role b on a.user_id = b.user_id
left join tab_sys_user_resource c on a.user_id = c.user_id
......@@ -237,6 +237,8 @@
<if test="resourceId != null">
and c.resource_id = #{resourceId}
</if>
GROUP BY a.user_id
</select>
......
package com.gic.auth.web.controller;
import com.gic.auth.service.MenuApiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -19,6 +20,8 @@ public class RoleController {
@Autowired
private RoleApiService roleApiService;
@Autowired
private MenuApiService menuApiService;
@RequestMapping("/get-detail")
public RestResponse getDetail(Integer id) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment