Browse Source

地区sql语句修复

sunjiabei/feature-20250710132313-二期模块
sunjiabei 4 weeks ago
parent
commit
9a1725d106
  1. 6
      src/main/resources/mapper/RoleMapper.xml

6
src/main/resources/mapper/RoleMapper.xml

@ -65,6 +65,9 @@
-- 自连接,通过 father_id 关联父角色 -- 自连接,通过 father_id 关联父角色
LEFT JOIN role father ON r.father_id = father.id LEFT JOIN role father ON r.father_id = father.id
<where> <where>
<if test="roleName != null and roleName != ''">
r.role_name LIKE CONCAT('%', #{roleName}, '%')
</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
@ -72,9 +75,6 @@
#{market} #{market}
</foreach> </foreach>
</if> </if>
<if test="roleName != null and roleName != ''">
r.role_name LIKE CONCAT('%', #{roleName}, '%')
</if>
</where> </where>
ORDER BY r.priority DESC ORDER BY r.priority DESC
</select> </select>

Loading…
Cancel
Save