|
@@ -0,0 +1,212 @@
|
|
|
+<?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.ygj.yuemum.dao.customer.CustomerInfoFollowMapper">
|
|
|
+
|
|
|
+ <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.customer.CustomerInfoFollow" >
|
|
|
+ <result column="id" property="id" />
|
|
|
+ <result column="create_date" property="create_date" />
|
|
|
+ <result column="follow_mehtod" property="follow_mehtod" />
|
|
|
+ <result column="fb_customer_name" property="fb_customer_name" />
|
|
|
+ <result column="fb_customer_phone" property="fb_customer_phone" />
|
|
|
+ <result column="source_channel" property="source_channel" />
|
|
|
+ <result column="edc_date" property="edc_date" />
|
|
|
+ <result column="follow_state" property="follow_state" />
|
|
|
+ <result column="address" property="address" />
|
|
|
+ <result column="follow_desc" property="follow_desc" />
|
|
|
+ <result column="photos" property="photos" />
|
|
|
+ <result column="next_follow_date" property="next_follow_date" />
|
|
|
+ <result column="create_person" property="create_person" />
|
|
|
+ <result column="fb_date" property="fb_date" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id,
|
|
|
+ create_date,
|
|
|
+ follow_mehtod,
|
|
|
+ fb_customer_name,
|
|
|
+ fb_customer_phone,
|
|
|
+ source_channel,
|
|
|
+ edc_date,
|
|
|
+ follow_state,
|
|
|
+ address,
|
|
|
+ follow_desc,
|
|
|
+ photos,
|
|
|
+ next_follow_date,
|
|
|
+ create_person,
|
|
|
+ fb_date
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <insert id="insert" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoFollow">
|
|
|
+ INSERT INTO customer_info_follow
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test ='null != create_date'>
|
|
|
+ create_date,
|
|
|
+ </if>
|
|
|
+ <if test ='null != follow_mehtod'>
|
|
|
+ follow_mehtod,
|
|
|
+ </if>
|
|
|
+ <if test ='null != fb_customer_name'>
|
|
|
+ fb_customer_name,
|
|
|
+ </if>
|
|
|
+ <if test ='null != fb_customer_phone'>
|
|
|
+ fb_customer_phone,
|
|
|
+ </if>
|
|
|
+ <if test ='null != source_channel'>
|
|
|
+ source_channel,
|
|
|
+ </if>
|
|
|
+ <if test ='null != edc_date'>
|
|
|
+ edc_date,
|
|
|
+ </if>
|
|
|
+ <if test ='null != follow_state'>
|
|
|
+ follow_state,
|
|
|
+ </if>
|
|
|
+ <if test ='null != address'>
|
|
|
+ address,
|
|
|
+ </if>
|
|
|
+ <if test ='null != follow_desc'>
|
|
|
+ follow_desc,
|
|
|
+ </if>
|
|
|
+ <if test ='null != photos'>
|
|
|
+ photos,
|
|
|
+ </if>
|
|
|
+ <if test ='null != next_follow_date'>
|
|
|
+ next_follow_date,
|
|
|
+ </if>
|
|
|
+ <if test ='null != create_person'>
|
|
|
+ create_person,
|
|
|
+ </if>
|
|
|
+ <if test ='null != fb_date'>
|
|
|
+ fb_date
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test ='null != create_date'>
|
|
|
+ #{create_date},
|
|
|
+ </if>
|
|
|
+ <if test ='null != follow_mehtod'>
|
|
|
+ #{follow_mehtod},
|
|
|
+ </if>
|
|
|
+ <if test ='null != fb_customer_name'>
|
|
|
+ #{fb_customer_name},
|
|
|
+ </if>
|
|
|
+ <if test ='null != fb_customer_phone'>
|
|
|
+ #{fb_customer_phone},
|
|
|
+ </if>
|
|
|
+ <if test ='null != source_channel'>
|
|
|
+ #{source_channel},
|
|
|
+ </if>
|
|
|
+ <if test ='null != edc_date'>
|
|
|
+ #{edc_date},
|
|
|
+ </if>
|
|
|
+ <if test ='null != follow_state'>
|
|
|
+ #{follow_state},
|
|
|
+ </if>
|
|
|
+ <if test ='null != address'>
|
|
|
+ #{address},
|
|
|
+ </if>
|
|
|
+ <if test ='null != follow_desc'>
|
|
|
+ #{follow_desc},
|
|
|
+ </if>
|
|
|
+ <if test ='null != photos'>
|
|
|
+ #{photos},
|
|
|
+ </if>
|
|
|
+ <if test ='null != next_follow_date'>
|
|
|
+ #{next_follow_date},
|
|
|
+ </if>
|
|
|
+ <if test ='null != create_person'>
|
|
|
+ #{create_person},
|
|
|
+ </if>
|
|
|
+ <if test ='null != fb_date'>
|
|
|
+ #{fb_date}
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <delete id="delete" >
|
|
|
+ DELETE FROM customer_info_follow
|
|
|
+ WHERE id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <update id="update" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoFollow">
|
|
|
+ UPDATE customer_info_follow
|
|
|
+ <set>
|
|
|
+ <if test ='null != create_date'>create_date = #{create_date},</if>
|
|
|
+ <if test ='null != follow_mehtod'>follow_mehtod = #{follow_mehtod},</if>
|
|
|
+ <if test ='null != fb_customer_name'>fb_customer_name = #{fb_customer_name},</if>
|
|
|
+ <if test ='null != fb_customer_phone'>fb_customer_phone = #{fb_customer_phone},</if>
|
|
|
+ <if test ='null != source_channel'>source_channel = #{source_channel},</if>
|
|
|
+ <if test ='null != edc_date'>edc_date = #{edc_date},</if>
|
|
|
+ <if test ='null != follow_state'>follow_state = #{follow_state},</if>
|
|
|
+ <if test ='null != address'>address = #{address},</if>
|
|
|
+ <if test ='null != follow_desc'>follow_desc = #{follow_desc},</if>
|
|
|
+ <if test ='null != photos'>photos = #{photos},</if>
|
|
|
+ <if test ='null != next_follow_date'>next_follow_date = #{next_follow_date},</if>
|
|
|
+ <if test ='null != create_person'>create_person = #{create_person},</if>
|
|
|
+ <if test ='null != fb_date'>fb_date = #{fb_date}</if>
|
|
|
+ </set>
|
|
|
+ WHERE id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="load" resultMap="BaseResultMap">
|
|
|
+ SELECT <include refid="Base_Column_List" />
|
|
|
+ FROM customer_info_follow
|
|
|
+ WHERE id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="pageList" resultMap="BaseResultMap">
|
|
|
+ SELECT <include refid="Base_Column_List" />
|
|
|
+ FROM customer_info_follow
|
|
|
+ LIMIT #{offset}, #{pageSize}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="pageListCount" resultType="java.lang.Integer">
|
|
|
+ SELECT count(1)
|
|
|
+ FROM customer_info_follow
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--获取所有数据-->
|
|
|
+ <select id="selectByPageNumSize" resultType="com.ygj.yuemum.domain.customer.CustomerInfoFollow" parameterType="com.ygj.yuemum.domain.customer.dto.CustomerInfoFollowDto">
|
|
|
+ SELECT
|
|
|
+ id,
|
|
|
+ create_date,
|
|
|
+ follow_mehtod,
|
|
|
+ fb_customer_name,
|
|
|
+ fb_customer_phone,
|
|
|
+ source_channel,
|
|
|
+ edc_date,
|
|
|
+ follow_state,
|
|
|
+ address,
|
|
|
+ follow_desc,
|
|
|
+ photos,
|
|
|
+ next_follow_date,
|
|
|
+ create_person,
|
|
|
+ fb_date
|
|
|
+ FROM
|
|
|
+ customer_info_follow
|
|
|
+ where 1=1
|
|
|
+ <if test="id != null and id !=''">
|
|
|
+ and id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="start_fb_date != null and start_fb_date !=''">
|
|
|
+ and fb_Date >= #{start_fb_date}
|
|
|
+ </if>
|
|
|
+ <if test="end_fb_date != null and end_fb_date !=''">
|
|
|
+ and fb_Date < #{end_fb_date}
|
|
|
+ </if>
|
|
|
+ <if test="follow_state != null and follow_state !=''">
|
|
|
+ and follow_state like "%"#{follow_state,jdbcType=VARCHAR}"%"
|
|
|
+ </if>
|
|
|
+ <if test="fb_customer_phone != null and fb_customer_phone !=''">
|
|
|
+ and fb_customer_phone like "%"#{fb_customer_phone,jdbcType=VARCHAR}"%"
|
|
|
+ </if>
|
|
|
+ <if test="create_person != null ">
|
|
|
+ and create_person in
|
|
|
+ <foreach collection="create_person" item="item" index="index" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|