|
|
@@ -229,6 +229,89 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="traceId != null">#{traceId},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
+ <insert id="insertCrmCustomerInfo">
|
|
|
+ INSERT INTO crm_customer_info
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="customerId != null">customer_id,</if>
|
|
|
+ <if test="name != null">name,</if>
|
|
|
+ <if test="sex != null">sex,</if>
|
|
|
+ <if test="age != null">age,</if>
|
|
|
+ <if test="address != null">address,</if>
|
|
|
+ <if test="habits != null">habits,</if>
|
|
|
+ <if test="illnessTime != null">illness_time,</if>
|
|
|
+ <if test="body != null">body,</if>
|
|
|
+ <if test="study != null">study,</if>
|
|
|
+ <if test="courseStatus != null">course_status,</if>
|
|
|
+ <if test="course != null">course,</if>
|
|
|
+ <if test="family != null">family,</if>
|
|
|
+ <if test="familyDisease != null">family_disease,</if>
|
|
|
+ <if test="disease != null">disease,</if>
|
|
|
+ <if test="isLine != null">is_line,</if>
|
|
|
+ <if test="talk != null">talk,</if>
|
|
|
+ <if test="userType != null">user_type,</if>
|
|
|
+ <if test="isSelf != null">is_self,</if>
|
|
|
+ <if test="intensify != null">intensify,</if>
|
|
|
+ <if test="isCold != null">is_cold,</if>
|
|
|
+ <if test="coldBody != null">cold_body,</if>
|
|
|
+ <if test="sweat != null">sweat,</if>
|
|
|
+ <if test="other != null">other,</if>
|
|
|
+ <if test="toilet != null">toilet,</if>
|
|
|
+ <if test="eat != null">eat,</if>
|
|
|
+ <if test="menses != null">menses,</if>
|
|
|
+ <if test="medicine != null">medicine,</if>
|
|
|
+ <if test="constitution != null">constitution,</if>
|
|
|
+ <if test="recommendMedicine != null">recommend_medicine,</if>
|
|
|
+ <if test="consultProduct != null">consult_product,</if>
|
|
|
+ <if test="isBuy != null">is_buy,</if>
|
|
|
+ <if test="buyProduct != null">buy_product,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="replyTime != null">reply_time,</if>
|
|
|
+ <if test="productTalk != null">product_talk,</if>
|
|
|
+ <if test="diseaseTalk != null">disease_talk,</if>
|
|
|
+ <if test="channelType != null">channel_type,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="customerId != null">#{customerId},</if>
|
|
|
+ <if test="name != null">#{name},</if>
|
|
|
+ <if test="sex != null">#{sex},</if>
|
|
|
+ <if test="age != null">#{age},</if>
|
|
|
+ <if test="address != null">#{address},</if>
|
|
|
+ <if test="habits != null">#{habits},</if>
|
|
|
+ <if test="illnessTime != null">#{illnessTime},</if>
|
|
|
+ <if test="body != null">#{body},</if>
|
|
|
+ <if test="study != null">#{study},</if>
|
|
|
+ <if test="courseStatus != null">#{courseStatus},</if>
|
|
|
+ <if test="course != null">#{course},</if>
|
|
|
+ <if test="family != null">#{family},</if>
|
|
|
+ <if test="familyDisease != null">#{familyDisease},</if>
|
|
|
+ <if test="disease != null">#{disease},</if>
|
|
|
+ <if test="isLine != null">#{isLine},</if>
|
|
|
+ <if test="talk != null">#{talk},</if>
|
|
|
+ <if test="userType != null">#{userType},</if>
|
|
|
+ <if test="isSelf != null">#{isSelf},</if>
|
|
|
+ <if test="intensify != null">#{intensify},</if>
|
|
|
+ <if test="isCold != null">#{isCold},</if>
|
|
|
+ <if test="coldBody != null">#{coldBody},</if>
|
|
|
+ <if test="sweat != null">#{sweat},</if>
|
|
|
+ <if test="other != null">#{other},</if>
|
|
|
+ <if test="toilet != null">#{toilet},</if>
|
|
|
+ <if test="eat != null">#{eat},</if>
|
|
|
+ <if test="menses != null">#{menses},</if>
|
|
|
+ <if test="medicine != null">#{medicine},</if>
|
|
|
+ <if test="constitution != null">#{constitution},</if>
|
|
|
+ <if test="recommendMedicine != null">#{recommendMedicine},</if>
|
|
|
+ <if test="consultProduct != null">#{consultProduct},</if>
|
|
|
+ <if test="isBuy != null">#{isBuy},</if>
|
|
|
+ <if test="buyProduct != null">#{buyProduct},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="replyTime != null">#{replyTime},</if>
|
|
|
+ <if test="productTalk != null">#{productTalk},</if>
|
|
|
+ <if test="diseaseTalk != null">#{diseaseTalk},</if>
|
|
|
+ <if test="channelType != null">#{channelType},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
|
|
|
<update id="updateCrmCustomer" parameterType="CrmCustomer">
|
|
|
update crm_customer
|
|
|
@@ -459,4 +542,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
order by cu.customer_user_id desc
|
|
|
</select>
|
|
|
+ <select id="selectCrmCustomerInfoById" resultType="com.fs.crm.domain.CrmCustomerInfo">
|
|
|
+ SELECT
|
|
|
+ id,customer_id,name,sex,age,address,habits,illness_time,body,study,course_status,course,family,family_disease,disease,is_line,
|
|
|
+ talk,user_type,is_self,intensify,is_cold,cold_body,sweat,other,toilet,eat,menses,medicine,constitution,recommend_medicine,
|
|
|
+ consult_product,is_buy,buy_product,create_time,update_time,reply_time,product_talk,disease_talk,channel_type
|
|
|
+ FROM crm_customer_info;
|
|
|
+ </select>
|
|
|
</mapper>
|