Commit 9257cea4 authored by 赵啸非's avatar 赵啸非

添加角色列表携带menuIds

parent aaec0c39
......@@ -22,8 +22,8 @@
<result property="createUserName" column="createUserName" />
<result property="lastLoginTime" column="lastLoginTime" />
<result property="lastLoginAddress" column="lastLoginAddress" />
<result property="roleIds" column="roleIds" />
<result property="roleNames" column="roleNames" />
<result property="roleId" column="roleId" />
<result property="roleName" column="roleName" />
</resultMap>
<!-- 获取列表 -->
......@@ -91,11 +91,11 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginAddress') or colPickMode == 1 and data.containsKey('lastLoginAddress')))">
a.lastLoginAddress,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleIds') or colPickMode == 1 and data.containsKey('roleIds')))">
a.roleIds,
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleId') or colPickMode == 1 and data.containsKey('roleId')))">
a.roleId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleNames') or colPickMode == 1 and data.containsKey('roleNames')))">
a.roleNames,
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleName') or colPickMode == 1 and data.containsKey('roleName')))">
a.roleName,
</if>
</trim>
</sql>
......@@ -104,8 +104,8 @@
select <include refid="_columnsExt"/>
from (
SELECT
u.*, group_concat(r.id) AS roleIds,
group_concat(r. NAME) AS roleNames
u.*, group_concat(r.id) AS roleId,
group_concat(r. NAME) AS roleName
FROM
mortals_xhx_user u
LEFT JOIN mortals_xhx_role_user ru ON u.id = ru.userId
......@@ -120,7 +120,7 @@
<if test="condition != null and !condition.isEmpty()">
<if test="condition.containsKey('roleId')">
<if test="condition.roleId != null">
and find_in_set(#{condition.roleId}, a.roleIds)
and find_in_set(#{condition.roleId}, a.roleId)
</if>
</if>
</if>
......@@ -135,8 +135,8 @@
select count(1)
from (
SELECT
u.*, group_concat(r.id) AS roleIds,
group_concat(r. NAME) AS roleNames
u.*, group_concat(r.id) AS roleId,
group_concat(r. NAME) AS roleName
FROM
mortals_xhx_user u
LEFT JOIN mortals_xhx_role_user ru ON u.id = ru.userId
......@@ -151,7 +151,7 @@
<if test="condition != null and !condition.isEmpty()">
<if test="condition.containsKey('roleId')">
<if test="condition.roleId != null">
and find_in_set(#{condition.roleId}, a.roleIds)
and find_in_set(#{condition.roleId}, a.roleId)
</if>
</if>
</if>
......
......@@ -7,10 +7,16 @@ Content-Type: application/json
{
"page":1,
"size":10,
"roleId":"2",
"roleId":"4",
"orConditionList":[
{
"loginName":"test"
"loginName":"test1"
},
{
"realName":"111"
},
{
"mobile":"13281114856"
}
]
}
......@@ -22,8 +28,8 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"loginName":"test",
"loginPwd":"test",
"loginName":"test1",
"loginPwd":"test1",
"realName":"测试",
"mobile":"13281114856",
"roleId": "1",
......
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