<?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>
|