src/main/resources/mapper/CstmrMapper.xml
@@ -51,4 +51,21 @@ order by uuid + 0 desc </select> <select id="listByPage" resultMap="BaseResultMap"> SELECT mc.* FROM man_cstmr mc LEFT JOIN sys_dept sd ON mc.dept_id = sd.id WHERE 1=1 AND (CHARINDEX(','+#{deptId}+',', ','+sd.path+',') > 0 OR sd.id = #{deptId}) <if test="hostId != null and hostId != ''"> and mc.host_id = #{hostId} </if> <if test="condition != null and condition != ''"> and mc.name like concat('%',#{condition},'%') </if> ORDER BY mc.create_time DESC </select> </mapper>