|
@ -59,6 +59,7 @@ |
|
|
r.role_name AS roleName, |
|
|
r.role_name AS roleName, |
|
|
r.priority AS priority, |
|
|
r.priority AS priority, |
|
|
r.father_id AS fatherId, |
|
|
r.father_id AS fatherId, |
|
|
|
|
|
r.market AS market, |
|
|
-- 通过自连接查询父角色名称 |
|
|
-- 通过自连接查询父角色名称 |
|
|
father.role_name AS fatherName |
|
|
father.role_name AS fatherName |
|
|
FROM role r |
|
|
FROM role r |
|
@ -68,6 +69,9 @@ |
|
|
<if test="roleName != null and roleName != ''"> |
|
|
<if test="roleName != null and roleName != ''"> |
|
|
r.role_name LIKE CONCAT('%', #{roleName}, '%') |
|
|
r.role_name LIKE CONCAT('%', #{roleName}, '%') |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
<if test="market != null and market != ''"> |
|
|
|
|
|
r.market LIKE CONCAT('%', #{market}, '%') |
|
|
|
|
|
</if> |
|
|
<!-- 判断 market 是否不为总部且 markets 不为空 --> |
|
|
<!-- 判断 market 是否不为总部且 markets 不为空 --> |
|
|
<if test="markets != null and markets.size() > 0 and '总部' not in markets"> |
|
|
<if test="markets != null and markets.size() > 0 and '总部' not in markets"> |
|
|
AND r.market IN |
|
|
AND r.market IN |
|
|