<iftest="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginAddress') or colPickMode == 1 and data.containsKey('lastLoginAddress')))">
<iftest="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginAddress') or colPickMode == 1 and data.containsKey('lastLoginAddress')))">
a.lastLoginAddress,
a.lastLoginAddress,
</if>
</if>
<iftest="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleIds') or colPickMode == 1 and data.containsKey('roleIds')))">
<iftest="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleId') or colPickMode == 1 and data.containsKey('roleId')))">
a.roleIds,
a.roleId,
</if>
</if>
<iftest="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleNames') or colPickMode == 1 and data.containsKey('roleNames')))">
<iftest="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleName') or colPickMode == 1 and data.containsKey('roleName')))">
a.roleNames,
a.roleName,
</if>
</if>
</trim>
</trim>
</sql>
</sql>
...
@@ -104,8 +104,8 @@
...
@@ -104,8 +104,8 @@
select <includerefid="_columnsExt"/>
select <includerefid="_columnsExt"/>
from (
from (
SELECT
SELECT
u.*, group_concat(r.id) AS roleIds,
u.*, group_concat(r.id) AS roleId,
group_concat(r. NAME) AS roleNames
group_concat(r. NAME) AS roleName
FROM
FROM
mortals_xhx_user u
mortals_xhx_user u
LEFT JOIN mortals_xhx_role_user ru ON u.id = ru.userId
LEFT JOIN mortals_xhx_role_user ru ON u.id = ru.userId
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
<iftest="condition != null and !condition.isEmpty()">
<iftest="condition != null and !condition.isEmpty()">
<iftest="condition.containsKey('roleId')">
<iftest="condition.containsKey('roleId')">
<iftest="condition.roleId != null">
<iftest="condition.roleId != null">
and find_in_set(#{condition.roleId}, a.roleIds)
and find_in_set(#{condition.roleId}, a.roleId)
</if>
</if>
</if>
</if>
</if>
</if>
...
@@ -135,8 +135,8 @@
...
@@ -135,8 +135,8 @@
select count(1)
select count(1)
from (
from (
SELECT
SELECT
u.*, group_concat(r.id) AS roleIds,
u.*, group_concat(r.id) AS roleId,
group_concat(r. NAME) AS roleNames
group_concat(r. NAME) AS roleName
FROM
FROM
mortals_xhx_user u
mortals_xhx_user u
LEFT JOIN mortals_xhx_role_user ru ON u.id = ru.userId
LEFT JOIN mortals_xhx_role_user ru ON u.id = ru.userId
...
@@ -151,7 +151,7 @@
...
@@ -151,7 +151,7 @@
<iftest="condition != null and !condition.isEmpty()">
<iftest="condition != null and !condition.isEmpty()">