Browse Source

修改数据库

wanghui 8 years ago
parent
commit
e3f1a1c5d3

+ 0 - 0
generatorConfig.out.xml


+ 2 - 3
generatorConfig.xml

@@ -1,14 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
 <generatorConfiguration>
-  <classPathEntry location="E:/mysql-connector-java-5.1.44.jar" />
+  <classPathEntry location="E:/mysql-connector-java-5.1.40.jar" />
   <context id="context1">	
     <jdbcConnection connectionURL="jdbc:mysql://192.168.1.213:3306/aft" 
     	driverClass="com.mysql.jdbc.Driver" password="123456" userId="dev" />
     <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="AFT" />
     <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="AFT" />
     <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="AFT" type="XMLMAPPER" />
-    <table schema="aft" tableName="customer_user_info"/>
-   <!--  <table schema="aft" tableName="customer_organization_info"/> -->
+    <table schema="aft" tableName="follow_up_record"/>
   </context>
 </generatorConfiguration>

+ 11 - 11
src/main/java/com/goafanti/common/dao/FollowUpRecordMapper.java

@@ -9,68 +9,68 @@ public interface FollowUpRecordMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	long countByExample(FollowUpRecordExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	int deleteByExample(FollowUpRecordExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	int deleteByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	int insert(FollowUpRecord record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	int insertSelective(FollowUpRecord record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	List<FollowUpRecord> selectByExample(FollowUpRecordExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	FollowUpRecord selectByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	int updateByExampleSelective(@Param("record") FollowUpRecord record,
 			@Param("example") FollowUpRecordExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	int updateByExample(@Param("record") FollowUpRecord record, @Param("example") FollowUpRecordExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	int updateByPrimaryKeySelective(FollowUpRecord record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	int updateByPrimaryKey(FollowUpRecord record);
 }

+ 9 - 9
src/main/java/com/goafanti/common/enums/CustomerIntentionFiled.java

@@ -5,23 +5,23 @@ import java.util.Map;
 
 public enum CustomerIntentionFiled {
 	/** 发明专利 **/
-	intention_invention(0,"发明专利"),
+	INTENTION_INVENTION(0,"发明专利"),
 	/** 实用型新型专利 **/
-	intention_practical(1,"实用型新型专利"),
+	INTENTION_PRACTICAL(1,"实用型新型专利"),
 	/** 外观专利 **/
-	intention_appearance(2,"外观专利"),
+	INTENTION_APPEARANCE(2,"外观专利"),
 	/** 软件著作权  **/
-	intention_soft(3,"软件著作权"),
+	INTENTION_SOFT(3,"软件著作权"),
 	/** 知识产权贯标  **/
-	intention_property(4,"知识产权贯标"),
+	INTENTION_PROPERTY(4,"知识产权贯标"),
 	/** 高企认定  **/
-	intention_cognizance(5,"高企认定"),
+	INTENTION_COGNIZANCE(5,"高企认定"),
 	/** 技术成果  **/
-	intention_achievement(6,"技术成果"),
+	INTENTION_ACHIEVEMENT(6,"技术成果"),
 	/** 技术需求  **/
-	intention_demand(7,"技术需求"),
+	INTENTION_DEMAND(7,"技术需求"),
 	/** 专家咨询  **/
-	intention_consultation(8,"专家咨询"),
+	INTENTION_CONSULTATION(8,"专家咨询"),
 	/** 未知  **/
 	OTHER(-1,"未知");
 	

+ 6 - 6
src/main/java/com/goafanti/common/enums/CustomerStatusFiled.java

@@ -5,17 +5,17 @@ import java.util.Map;
 
 public enum CustomerStatusFiled {
 	/** 新客户 **/
-	status_new(0,"新客户"),
+	STATUS_NEW(0,"新客户"),
 	/** 意向客户 **/
-	status_intention(1,"意向客户"),
+	STATUS_INTENTION(1,"意向客户"),
 	/** 重点客户 **/
-	status_point(2,"重点客户"),
+	STATUS_POINT(2,"重点客户"),
 	/** 面谈客户  **/
-	status_interview(3,"面谈客户"),
+	STATUS_INTERVIEW(3,"面谈客户"),
 	/** 签单客户 **/
-	status_sign(4,"签单客户"),
+	STATUS_SIGN(4,"签单客户"),
 	/** 拒绝客户 **/
-	status_refuse(5,"拒绝客户"),
+	STATUS_REFUSE(5,"拒绝客户"),
 	/** 未知  **/
 	OTHER(-1,"未知");
 	

+ 49 - 33
src/main/java/com/goafanti/common/mapper/FollowUpRecordMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 13 09:37:04 CST 2017.
+      This element was generated on Tue Oct 17 14:55:38 CST 2017.
     -->
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="cid" jdbcType="VARCHAR" property="cid" />
@@ -13,15 +13,16 @@
     <result column="follow_date" jdbcType="TIMESTAMP" property="followDate" />
     <result column="tm_stamp" jdbcType="TIMESTAMP" property="tmStamp" />
     <result column="follow_result" jdbcType="VARCHAR" property="followResult" />
-    <result column="follow_status" jdbcType="INTEGER" property="followStatus" />
+    <result column="follow_situation" jdbcType="INTEGER" property="followSituation" />
     <result column="attachment" jdbcType="INTEGER" property="attachment" />
     <result column="cuid" jdbcType="VARCHAR" property="cuid" />
+    <result column="customer_status" jdbcType="INTEGER" property="customerStatus" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 13 09:37:04 CST 2017.
+      This element was generated on Tue Oct 17 14:55:38 CST 2017.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -55,7 +56,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 13 09:37:04 CST 2017.
+      This element was generated on Tue Oct 17 14:55:38 CST 2017.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -89,15 +90,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 13 09:37:04 CST 2017.
+      This element was generated on Tue Oct 17 14:55:38 CST 2017.
     -->
-    id, cid, aid, follow_date, tm_stamp, follow_result, follow_status, attachment, cuid
+    id, cid, aid, follow_date, tm_stamp, follow_result, follow_situation, attachment, 
+    cuid, customer_status
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.FollowUpRecordExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 13 09:37:04 CST 2017.
+      This element was generated on Tue Oct 17 14:55:38 CST 2017.
     -->
     select
     <if test="distinct">
@@ -116,7 +118,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 13 09:37:04 CST 2017.
+      This element was generated on Tue Oct 17 14:55:38 CST 2017.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -127,7 +129,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 13 09:37:04 CST 2017.
+      This element was generated on Tue Oct 17 14:55:38 CST 2017.
     -->
     delete from follow_up_record
     where id = #{id,jdbcType=VARCHAR}
@@ -136,7 +138,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 13 09:37:04 CST 2017.
+      This element was generated on Tue Oct 17 14:55:38 CST 2017.
     -->
     delete from follow_up_record
     <if test="_parameter != null">
@@ -147,22 +149,22 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 13 09:37:04 CST 2017.
+      This element was generated on Tue Oct 17 14:55:38 CST 2017.
     -->
     insert into follow_up_record (id, cid, aid, 
       follow_date, tm_stamp, follow_result, 
-      follow_status, attachment, cuid
-      )
+      follow_situation, attachment, cuid, 
+      customer_status)
     values (#{id,jdbcType=VARCHAR}, #{cid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
       #{followDate,jdbcType=TIMESTAMP}, #{tmStamp,jdbcType=TIMESTAMP}, #{followResult,jdbcType=VARCHAR}, 
-      #{followStatus,jdbcType=INTEGER}, #{attachment,jdbcType=INTEGER}, #{cuid,jdbcType=VARCHAR}
-      )
+      #{followSituation,jdbcType=INTEGER}, #{attachment,jdbcType=INTEGER}, #{cuid,jdbcType=VARCHAR}, 
+      #{customerStatus,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.FollowUpRecord">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 13 09:37:04 CST 2017.
+      This element was generated on Tue Oct 17 14:55:38 CST 2017.
     -->
     insert into follow_up_record
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -184,8 +186,8 @@
       <if test="followResult != null">
         follow_result,
       </if>
-      <if test="followStatus != null">
-        follow_status,
+      <if test="followSituation != null">
+        follow_situation,
       </if>
       <if test="attachment != null">
         attachment,
@@ -193,6 +195,9 @@
       <if test="cuid != null">
         cuid,
       </if>
+      <if test="customerStatus != null">
+        customer_status,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -213,8 +218,8 @@
       <if test="followResult != null">
         #{followResult,jdbcType=VARCHAR},
       </if>
-      <if test="followStatus != null">
-        #{followStatus,jdbcType=INTEGER},
+      <if test="followSituation != null">
+        #{followSituation,jdbcType=INTEGER},
       </if>
       <if test="attachment != null">
         #{attachment,jdbcType=INTEGER},
@@ -222,13 +227,16 @@
       <if test="cuid != null">
         #{cuid,jdbcType=VARCHAR},
       </if>
+      <if test="customerStatus != null">
+        #{customerStatus,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.FollowUpRecordExample" resultType="java.lang.Long">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 13 09:37:04 CST 2017.
+      This element was generated on Tue Oct 17 14:55:38 CST 2017.
     -->
     select count(*) from follow_up_record
     <if test="_parameter != null">
@@ -239,7 +247,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 13 09:37:04 CST 2017.
+      This element was generated on Tue Oct 17 14:55:38 CST 2017.
     -->
     update follow_up_record
     <set>
@@ -261,8 +269,8 @@
       <if test="record.followResult != null">
         follow_result = #{record.followResult,jdbcType=VARCHAR},
       </if>
-      <if test="record.followStatus != null">
-        follow_status = #{record.followStatus,jdbcType=INTEGER},
+      <if test="record.followSituation != null">
+        follow_situation = #{record.followSituation,jdbcType=INTEGER},
       </if>
       <if test="record.attachment != null">
         attachment = #{record.attachment,jdbcType=INTEGER},
@@ -270,6 +278,9 @@
       <if test="record.cuid != null">
         cuid = #{record.cuid,jdbcType=VARCHAR},
       </if>
+      <if test="record.customerStatus != null">
+        customer_status = #{record.customerStatus,jdbcType=INTEGER},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -279,7 +290,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 13 09:37:04 CST 2017.
+      This element was generated on Tue Oct 17 14:55:38 CST 2017.
     -->
     update follow_up_record
     set id = #{record.id,jdbcType=VARCHAR},
@@ -288,9 +299,10 @@
       follow_date = #{record.followDate,jdbcType=TIMESTAMP},
       tm_stamp = #{record.tmStamp,jdbcType=TIMESTAMP},
       follow_result = #{record.followResult,jdbcType=VARCHAR},
-      follow_status = #{record.followStatus,jdbcType=INTEGER},
+      follow_situation = #{record.followSituation,jdbcType=INTEGER},
       attachment = #{record.attachment,jdbcType=INTEGER},
-      cuid = #{record.cuid,jdbcType=VARCHAR}
+      cuid = #{record.cuid,jdbcType=VARCHAR},
+      customer_status = #{record.customerStatus,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -299,7 +311,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 13 09:37:04 CST 2017.
+      This element was generated on Tue Oct 17 14:55:38 CST 2017.
     -->
     update follow_up_record
     <set>
@@ -318,8 +330,8 @@
       <if test="followResult != null">
         follow_result = #{followResult,jdbcType=VARCHAR},
       </if>
-      <if test="followStatus != null">
-        follow_status = #{followStatus,jdbcType=INTEGER},
+      <if test="followSituation != null">
+        follow_situation = #{followSituation,jdbcType=INTEGER},
       </if>
       <if test="attachment != null">
         attachment = #{attachment,jdbcType=INTEGER},
@@ -327,6 +339,9 @@
       <if test="cuid != null">
         cuid = #{cuid,jdbcType=VARCHAR},
       </if>
+      <if test="customerStatus != null">
+        customer_status = #{customerStatus,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -334,7 +349,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 13 09:37:04 CST 2017.
+      This element was generated on Tue Oct 17 14:55:38 CST 2017.
     -->
     update follow_up_record
     set cid = #{cid,jdbcType=VARCHAR},
@@ -342,9 +357,10 @@
       follow_date = #{followDate,jdbcType=TIMESTAMP},
       tm_stamp = #{tmStamp,jdbcType=TIMESTAMP},
       follow_result = #{followResult,jdbcType=VARCHAR},
-      follow_status = #{followStatus,jdbcType=INTEGER},
+      follow_situation = #{followSituation,jdbcType=INTEGER},
       attachment = #{attachment,jdbcType=INTEGER},
-      cuid = #{cuid,jdbcType=VARCHAR}
+      cuid = #{cuid,jdbcType=VARCHAR},
+      customer_status = #{customerStatus,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
 </mapper>

+ 60 - 37
src/main/java/com/goafanti/common/model/FollowUpRecord.java

@@ -6,54 +6,59 @@ public class FollowUpRecord {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column follow_up_record.id
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	private String id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column follow_up_record.cid
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	private String cid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column follow_up_record.aid
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	private String aid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column follow_up_record.follow_date
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	private Date followDate;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column follow_up_record.tm_stamp
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	private Date tmStamp;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column follow_up_record.follow_result
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	private String followResult;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column follow_up_record.follow_status
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column follow_up_record.follow_situation
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
-	private Integer followStatus;
+	private Integer followSituation;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column follow_up_record.attachment
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	private Integer attachment;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column follow_up_record.cuid
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	private String cuid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column follow_up_record.customer_status
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
+	 */
+	private Integer customerStatus;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column follow_up_record.id
 	 * @return  the value of follow_up_record.id
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public String getId() {
 		return id;
@@ -62,7 +67,7 @@ public class FollowUpRecord {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column follow_up_record.id
 	 * @param id  the value for follow_up_record.id
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public void setId(String id) {
 		this.id = id;
@@ -71,7 +76,7 @@ public class FollowUpRecord {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column follow_up_record.cid
 	 * @return  the value of follow_up_record.cid
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public String getCid() {
 		return cid;
@@ -80,7 +85,7 @@ public class FollowUpRecord {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column follow_up_record.cid
 	 * @param cid  the value for follow_up_record.cid
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public void setCid(String cid) {
 		this.cid = cid;
@@ -89,7 +94,7 @@ public class FollowUpRecord {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column follow_up_record.aid
 	 * @return  the value of follow_up_record.aid
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public String getAid() {
 		return aid;
@@ -98,7 +103,7 @@ public class FollowUpRecord {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column follow_up_record.aid
 	 * @param aid  the value for follow_up_record.aid
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public void setAid(String aid) {
 		this.aid = aid;
@@ -107,7 +112,7 @@ public class FollowUpRecord {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column follow_up_record.follow_date
 	 * @return  the value of follow_up_record.follow_date
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public Date getFollowDate() {
 		return followDate;
@@ -116,7 +121,7 @@ public class FollowUpRecord {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column follow_up_record.follow_date
 	 * @param followDate  the value for follow_up_record.follow_date
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public void setFollowDate(Date followDate) {
 		this.followDate = followDate;
@@ -125,7 +130,7 @@ public class FollowUpRecord {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column follow_up_record.tm_stamp
 	 * @return  the value of follow_up_record.tm_stamp
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public Date getTmStamp() {
 		return tmStamp;
@@ -134,7 +139,7 @@ public class FollowUpRecord {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column follow_up_record.tm_stamp
 	 * @param tmStamp  the value for follow_up_record.tm_stamp
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public void setTmStamp(Date tmStamp) {
 		this.tmStamp = tmStamp;
@@ -143,7 +148,7 @@ public class FollowUpRecord {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column follow_up_record.follow_result
 	 * @return  the value of follow_up_record.follow_result
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public String getFollowResult() {
 		return followResult;
@@ -152,34 +157,34 @@ public class FollowUpRecord {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column follow_up_record.follow_result
 	 * @param followResult  the value for follow_up_record.follow_result
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public void setFollowResult(String followResult) {
 		this.followResult = followResult;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column follow_up_record.follow_status
-	 * @return  the value of follow_up_record.follow_status
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column follow_up_record.follow_situation
+	 * @return  the value of follow_up_record.follow_situation
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
-	public Integer getFollowStatus() {
-		return followStatus;
+	public Integer getFollowSituation() {
+		return followSituation;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column follow_up_record.follow_status
-	 * @param followStatus  the value for follow_up_record.follow_status
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column follow_up_record.follow_situation
+	 * @param followSituation  the value for follow_up_record.follow_situation
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
-	public void setFollowStatus(Integer followStatus) {
-		this.followStatus = followStatus;
+	public void setFollowSituation(Integer followSituation) {
+		this.followSituation = followSituation;
 	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column follow_up_record.attachment
 	 * @return  the value of follow_up_record.attachment
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public Integer getAttachment() {
 		return attachment;
@@ -188,7 +193,7 @@ public class FollowUpRecord {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column follow_up_record.attachment
 	 * @param attachment  the value for follow_up_record.attachment
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public void setAttachment(Integer attachment) {
 		this.attachment = attachment;
@@ -197,7 +202,7 @@ public class FollowUpRecord {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column follow_up_record.cuid
 	 * @return  the value of follow_up_record.cuid
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public String getCuid() {
 		return cuid;
@@ -206,9 +211,27 @@ public class FollowUpRecord {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column follow_up_record.cuid
 	 * @param cuid  the value for follow_up_record.cuid
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public void setCuid(String cuid) {
 		this.cuid = cuid;
 	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column follow_up_record.customer_status
+	 * @return  the value of follow_up_record.customer_status
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
+	 */
+	public Integer getCustomerStatus() {
+		return customerStatus;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column follow_up_record.customer_status
+	 * @param customerStatus  the value for follow_up_record.customer_status
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
+	 */
+	public void setCustomerStatus(Integer customerStatus) {
+		this.customerStatus = customerStatus;
+	}
 }

+ 100 - 40
src/main/java/com/goafanti/common/model/FollowUpRecordExample.java

@@ -7,23 +7,23 @@ import java.util.List;
 public class FollowUpRecordExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public FollowUpRecordExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -31,7 +31,7 @@ public class FollowUpRecordExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -39,7 +39,7 @@ public class FollowUpRecordExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -47,7 +47,7 @@ public class FollowUpRecordExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -55,7 +55,7 @@ public class FollowUpRecordExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -63,7 +63,7 @@ public class FollowUpRecordExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -71,7 +71,7 @@ public class FollowUpRecordExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -79,7 +79,7 @@ public class FollowUpRecordExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -89,7 +89,7 @@ public class FollowUpRecordExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -101,7 +101,7 @@ public class FollowUpRecordExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -110,7 +110,7 @@ public class FollowUpRecordExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -120,7 +120,7 @@ public class FollowUpRecordExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -563,63 +563,63 @@ public class FollowUpRecordExample {
 			return (Criteria) this;
 		}
 
-		public Criteria andFollowStatusIsNull() {
-			addCriterion("follow_status is null");
+		public Criteria andFollowSituationIsNull() {
+			addCriterion("follow_situation is null");
 			return (Criteria) this;
 		}
 
-		public Criteria andFollowStatusIsNotNull() {
-			addCriterion("follow_status is not null");
+		public Criteria andFollowSituationIsNotNull() {
+			addCriterion("follow_situation is not null");
 			return (Criteria) this;
 		}
 
-		public Criteria andFollowStatusEqualTo(Integer value) {
-			addCriterion("follow_status =", value, "followStatus");
+		public Criteria andFollowSituationEqualTo(Integer value) {
+			addCriterion("follow_situation =", value, "followSituation");
 			return (Criteria) this;
 		}
 
-		public Criteria andFollowStatusNotEqualTo(Integer value) {
-			addCriterion("follow_status <>", value, "followStatus");
+		public Criteria andFollowSituationNotEqualTo(Integer value) {
+			addCriterion("follow_situation <>", value, "followSituation");
 			return (Criteria) this;
 		}
 
-		public Criteria andFollowStatusGreaterThan(Integer value) {
-			addCriterion("follow_status >", value, "followStatus");
+		public Criteria andFollowSituationGreaterThan(Integer value) {
+			addCriterion("follow_situation >", value, "followSituation");
 			return (Criteria) this;
 		}
 
-		public Criteria andFollowStatusGreaterThanOrEqualTo(Integer value) {
-			addCriterion("follow_status >=", value, "followStatus");
+		public Criteria andFollowSituationGreaterThanOrEqualTo(Integer value) {
+			addCriterion("follow_situation >=", value, "followSituation");
 			return (Criteria) this;
 		}
 
-		public Criteria andFollowStatusLessThan(Integer value) {
-			addCriterion("follow_status <", value, "followStatus");
+		public Criteria andFollowSituationLessThan(Integer value) {
+			addCriterion("follow_situation <", value, "followSituation");
 			return (Criteria) this;
 		}
 
-		public Criteria andFollowStatusLessThanOrEqualTo(Integer value) {
-			addCriterion("follow_status <=", value, "followStatus");
+		public Criteria andFollowSituationLessThanOrEqualTo(Integer value) {
+			addCriterion("follow_situation <=", value, "followSituation");
 			return (Criteria) this;
 		}
 
-		public Criteria andFollowStatusIn(List<Integer> values) {
-			addCriterion("follow_status in", values, "followStatus");
+		public Criteria andFollowSituationIn(List<Integer> values) {
+			addCriterion("follow_situation in", values, "followSituation");
 			return (Criteria) this;
 		}
 
-		public Criteria andFollowStatusNotIn(List<Integer> values) {
-			addCriterion("follow_status not in", values, "followStatus");
+		public Criteria andFollowSituationNotIn(List<Integer> values) {
+			addCriterion("follow_situation not in", values, "followSituation");
 			return (Criteria) this;
 		}
 
-		public Criteria andFollowStatusBetween(Integer value1, Integer value2) {
-			addCriterion("follow_status between", value1, value2, "followStatus");
+		public Criteria andFollowSituationBetween(Integer value1, Integer value2) {
+			addCriterion("follow_situation between", value1, value2, "followSituation");
 			return (Criteria) this;
 		}
 
-		public Criteria andFollowStatusNotBetween(Integer value1, Integer value2) {
-			addCriterion("follow_status not between", value1, value2, "followStatus");
+		public Criteria andFollowSituationNotBetween(Integer value1, Integer value2) {
+			addCriterion("follow_situation not between", value1, value2, "followSituation");
 			return (Criteria) this;
 		}
 
@@ -752,11 +752,71 @@ public class FollowUpRecordExample {
 			addCriterion("cuid not between", value1, value2, "cuid");
 			return (Criteria) this;
 		}
+
+		public Criteria andCustomerStatusIsNull() {
+			addCriterion("customer_status is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCustomerStatusIsNotNull() {
+			addCriterion("customer_status is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCustomerStatusEqualTo(Integer value) {
+			addCriterion("customer_status =", value, "customerStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andCustomerStatusNotEqualTo(Integer value) {
+			addCriterion("customer_status <>", value, "customerStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andCustomerStatusGreaterThan(Integer value) {
+			addCriterion("customer_status >", value, "customerStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andCustomerStatusGreaterThanOrEqualTo(Integer value) {
+			addCriterion("customer_status >=", value, "customerStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andCustomerStatusLessThan(Integer value) {
+			addCriterion("customer_status <", value, "customerStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andCustomerStatusLessThanOrEqualTo(Integer value) {
+			addCriterion("customer_status <=", value, "customerStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andCustomerStatusIn(List<Integer> values) {
+			addCriterion("customer_status in", values, "customerStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andCustomerStatusNotIn(List<Integer> values) {
+			addCriterion("customer_status not in", values, "customerStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andCustomerStatusBetween(Integer value1, Integer value2) {
+			addCriterion("customer_status between", value1, value2, "customerStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andCustomerStatusNotBetween(Integer value1, Integer value2) {
+			addCriterion("customer_status not between", value1, value2, "customerStatus");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table follow_up_record
-	 * @mbg.generated  Fri Oct 13 09:37:04 CST 2017
+	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
 	 */
 	public static class Criterion {
 		private String condition;

+ 16 - 0
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -2,6 +2,7 @@ package com.goafanti.customer.controller;
 
 import java.lang.reflect.InvocationTargetException;
 import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.List;
 import java.util.UUID;
 
@@ -229,4 +230,19 @@ public class AdminCustomerApiController extends BaseController {
 	    return res;
 	}
 	
+	/**
+	 * 添加跟进记录
+	 * @param fur
+	 * @return
+	 * @throws ParseException 
+	 */
+	@RequestMapping(value = "addFollow", method = RequestMethod.POST)
+	public Result addFollowUpRecord(FollowUpRecord fur, CustomerIn cusIn ,String followDate) throws ParseException{
+		Result res = new Result();
+		SimpleDateFormat format = new SimpleDateFormat(AFTConstants.YYYYMMDDHHMMSS);
+		if(StringUtils.isNotBlank(followDate)) fur.setFollowDate(format.parse(followDate));
+		
+		followUpService.addFollowUp(fur, cusIn);
+		return res;
+	}
 }

+ 18 - 6
src/main/java/com/goafanti/customer/service/impl/FollowUpServiceImp.java

@@ -1,13 +1,16 @@
 package com.goafanti.customer.service.impl;
 
-import java.util.Date;
+import java.lang.reflect.InvocationTargetException;
 
+import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import com.goafanti.common.dao.CustomerMapper;
 import com.goafanti.common.dao.CustomerUserInfoMapper;
 import com.goafanti.common.dao.FollowUpRecordMapper;
+import com.goafanti.common.model.Customer;
 import com.goafanti.common.model.FollowUpRecord;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.customer.bo.CustomerIn;
@@ -16,13 +19,22 @@ import com.goafanti.customer.service.FollowUpService;
 public class FollowUpServiceImp extends BaseMybatisDao<CustomerUserInfoMapper>  implements FollowUpService{
 	@Autowired
 	private FollowUpRecordMapper followUpRecordMapper ;
-
+	@Autowired
+	private CustomerMapper customerMapper;
 	@Override
 	public int addFollowUp(FollowUpRecord fur,CustomerIn cusIn) {
-		fur.setFollowDate(new Date());
-		if(StringUtils.isNotBlank(cusIn.getFollowSituation())) fur.setFollowStatus( Integer.parseInt(cusIn.getFollowSituation()));
-		if(StringUtils.isNotBlank(cusIn.getFollowResult())) fur.setFollowResult(cusIn.getFollowResult());
-		return followUpRecordMapper.insert(fur);
+		Customer cus = new Customer();
+		try {
+			BeanUtils.copyProperties(cus, cusIn);
+			if(StringUtils.isNotBlank(cusIn.getFollowSituation()))
+				cus.setFollowSituation(Integer.parseInt(cusIn.getFollowSituation()));	
+			if(StringUtils.isNotBlank(cusIn.getCustomerStatus()))
+				cus.setCustomerStatus(Integer.parseInt(cusIn.getCustomerStatus()));
+		} catch (IllegalAccessException | InvocationTargetException e) {			
+			e.printStackTrace();
+		}
+		 followUpRecordMapper.insert(fur);
+		return  customerMapper.updateByPrimaryKeySelective(cus);
 	}