<iftest="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginAddress') or colPickMode == 1 and data.containsKey('lastLoginAddress')))">
a.lastLoginAddress,
</if>
<iftest="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleIds') or colPickMode == 1 and data.containsKey('roleIds')))">
a.roleIds,
<iftest="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleId') or colPickMode == 1 and data.containsKey('roleId')))">
a.roleId,
</if>
<iftest="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleNames') or colPickMode == 1 and data.containsKey('roleNames')))">
a.roleNames,
<iftest="(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 <includerefid="_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 @@
<iftest="condition != null and !condition.isEmpty()">
<iftest="condition.containsKey('roleId')">
<iftest="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 @@
<iftest="condition != null and !condition.isEmpty()">