中扬CRM客户关系管理系统
#
luxiaotao1123
2022-09-16 17362f5075d91d26bca2231396c624902049e12d
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>