6 天以前 f569e2257372a2f940aace9ad151fd758196eb9a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.basic.mapper.CustomerFollowUpMapper">
 
    <select id="selectFollowUpExportList" resultType="com.ruoyi.basic.vo.CustomerFollowUpExportVo">
        select
            c.customer_name as customerName,
            c.customer_type as customerType,
            c.contact_person as contactPerson,
            c.contact_phone as contactPhone,
            c.maintainer as maintainer,
            f.follow_up_method as followUpMethod,
            f.follow_up_level as followUpLevel,
            f.follow_up_time as followUpTime,
            f.follower_user_name as followerUserName,
            f.content as content
        from customer_follow_up f
        left join customer c on f.customer_id = c.id
        <where>
            <if test="customerName != null and customerName != ''">
                and c.customer_name like concat('%', #{customerName}, '%')
            </if>
            <if test="customerType != null and customerType != ''">
                and c.customer_type = #{customerType}
            </if>
        </where>
        order by c.id desc, f.follow_up_time desc
    </select>
 
</mapper>