123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- <?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.CustomerInfoFeedbackDao" >
- <!--获取所有数据-->
- <select id="selectByPageNumSize" resultType="com.ygj.yuemum.domain.customer.CustomerInfoFeedback" parameterType="com.ygj.yuemum.domain.customer.dto.CustomerInfoFeedbackDto">
- SELECT
- id,
- fb_date,
- source_channel,
- fb_customer_phone,
- branche_name,
- fb_type,
- create_person,
- in_charge_person,
- customer_manager,
- entry_date,
- edc_date,
- fb_wechat_number,
- fb_customer_name,
- fb_remarks,
- it_on,
- convenient_time,
- communication_content,
- user_feedback,
- store
- FROM
- customer_info_feedback
- 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="source_channel != null ">
- and source_channel in
- <foreach collection="source_channel" item="item" index="index" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="fb_customer_phone != null and fb_customer_phone !=''">
- and fb_customer_phone like "%"#{fb_customer_phone,jdbcType=VARCHAR}"%"
- </if>
- <if test="branche_name != null ">
- and branche_name in
- <foreach collection="branche_name" item="item" index="index" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="fb_type != null ">
- and fb_type in
- <foreach collection="fb_type" item="item" index="index" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="create_person != null ">
- and create_person in
- <foreach collection="create_person" item="item" index="index" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="in_charge_person != null ">
- and in_charge_person in
- <foreach collection="in_charge_person" item="item" index="index" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="customer_manager != null ">
- and customer_manager in
- <foreach collection="customer_manager" item="item" index="index" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </select>
-
- <insert id="insertInfoFeedback" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoFeedback">
- insert into customer_info_feedback (fb_date, source_channel, fb_customer_phone, branche_name, fb_type, create_person, in_charge_person, customer_manager, entry_date, p_code, fb_customer_name, fb_wechat_number, edc_date, fb_remarks)
- values (#{fb_date}, #{source_channel}, #{fb_customer_phone}, #{branche_name}, #{fb_type}, #{create_person}, #{in_charge_person}, #{customer_manager}, #{entry_date}, #{p_code}, #{fb_customer_name}, #{fb_wechat_number}, #{edc_date}, #{fb_remarks})
- </insert>
- <select id="getById" resultType="com.ygj.yuemum.domain.customer.CustomerInfoFeedback">
- SELECT
- id,
- fb_date,
- source_channel,
- fb_customer_phone,
- branche_name,
- fb_type,
- create_person,
- in_charge_person,
- customer_manager,
- entry_date,
- edc_date,
- fb_wechat_number,
- fb_customer_name,
- fb_remarks,
- store,
- (
- SELECT
- p.p_name
- FROM
- packages p
- WHERE
- p.p_code = customer_info_feedback.p_code
- ) AS p_code,
- it_on,
- convenient_time,
- communication_content,
- user_feedback
- FROM
- customer_info_feedback
- WHERE
- id = #{id}
- </select>
- <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoFeedback">
- update customer_info_feedback
- <set>
- <if test="fb_date != null">
- `fb_date` = #{fb_date,jdbcType=TIMESTAMP},
- </if>
- <if test="source_channel != null">
- `source_channel` = #{source_channel,jdbcType=VARCHAR},
- </if>
- <if test="fb_customer_phone != null">
- `fb_customer_phone` = #{fb_customer_phone,jdbcType=VARCHAR},
- </if>
- <if test="branche_name != null">
- `branche_name` = #{branche_name,jdbcType=VARCHAR},
- </if>
- <if test="fb_type != null">
- `fb_type` = #{fb_type,jdbcType=VARCHAR},
- </if>
- <if test="create_person != null">
- `create_person` = #{create_person,jdbcType=VARCHAR},
- </if>
- <if test="in_charge_person != null">
- `in_charge_person` = #{in_charge_person,jdbcType=VARCHAR},
- </if>
- <if test="customer_manager != null">
- `customer_manager` = #{customer_manager,jdbcType=VARCHAR},
- </if>
- <if test="entry_date != null">
- `entry_date` = #{entry_date,jdbcType=TIMESTAMP},
- </if>
- <if test="p_code != null">
- `p_code` = #{p_code,jdbcType=VARCHAR},
- </if>
- <if test="fb_customer_name != null">
- `fb_customer_name` = #{fb_customer_name,jdbcType=VARCHAR},
- </if>
- <if test="fb_wechat_number != null">
- `fb_wechat_number` = #{fb_wechat_number,jdbcType=VARCHAR},
- </if>
- <if test="edc_date != null">
- `edc_date` = #{edc_date,jdbcType=TIMESTAMP},
- </if>
- <if test="fb_remarks != null">
- `fb_remarks` = #{fb_remarks,jdbcType=VARCHAR},
- </if>
- <if test="it_on != null">
- `it_on` = #{it_on,jdbcType=VARCHAR},
- </if>
- <if test="convenient_time != null">
- `convenient_time` = #{convenient_time,jdbcType=VARCHAR},
- </if>
- <if test="communication_content != null">
- `communication_content` = #{communication_content,jdbcType=VARCHAR},
- </if>
- <if test="user_feedback != null">
- `user_feedback` = #{user_feedback,jdbcType=VARCHAR},
- </if>
- <if test="store != null">
- `store` = #{store,jdbcType=VARCHAR},
- </if>
- </set>
- where `id` = #{id,jdbcType=INTEGER}
- </update>
- <insert id="insertInfoFeedbackList">
- insert into customer_info_feedback (fb_date, source_channel, fb_customer_phone, branche_name, fb_type, create_person, in_charge_person, customer_manager, entry_date, p_code, fb_customer_name, fb_wechat_number, edc_date, fb_remarks, it_on, convenient_time, communication_content, user_feedback, store)
- values
- <foreach collection="list" item="item" separator=",">
- (#{item.fb_date}, #{item.source_channel}, #{item.fb_customer_phone}, #{item.branche_name}, #{item.fb_type}, #{item.create_person}, #{item.in_charge_person}, #{item.customer_manager}, #{item.entry_date}, #{item.p_code}, #{item.fb_customer_name}, #{item.fb_wechat_number}, #{item.edc_date}, #{item.fb_remarks}, #{item.it_on}, #{item.convenient_time}, #{item.communication_content}, #{item.user_feedback}, #{item.store})
- </foreach>
- </insert>
- </mapper>
|