Browse Source

Merge remote-tracking branch 'origin/dev' into dev

Conflicts:
	src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java
zou_ht 8 years ago
parent
commit
d3040c208b

+ 6 - 5
src/main/java/com/goafanti/common/dao/CustomerMapper.java

@@ -80,11 +80,6 @@ public interface CustomerMapper {
 	 * @return
 	 */
 	CustomerOut selectCustomerById(String id);
-	
-	/**
-     * 查询客户详情
-     */
-    Customer selectCustomerByPrimaryKey(String id);
 
     /**
      * 
@@ -93,4 +88,10 @@ public interface CustomerMapper {
      */
     List<Customer> selectByLadderId(@Param("ladderId")String ladderId);
     
+    /**
+     * 
+     * @param ladderId 上层领导ID
+     * @return 查询团队 客户记录
+     */
+    List<Customer> updFollowId(Customer record);
 }

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

@@ -2,6 +2,8 @@ package com.goafanti.common.dao;
 
 import com.goafanti.common.model.FollowUpRecord;
 import com.goafanti.common.model.FollowUpRecordExample;
+import com.goafanti.customer.bo.FollowUpRecordOut;
+
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
@@ -9,68 +11,75 @@ public interface FollowUpRecordMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table follow_up_record
-	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	int updateByPrimaryKey(FollowUpRecord record);
+	
+	/**
+	 * 查询跟进记录列表
+	 * @param customerId
+	 * @return
+	 */
+	List<FollowUpRecordOut> listFollowUpRecord(@Param("cid")String cid);
 }

+ 47 - 20
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 Tue Oct 17 14:55:38 CST 2017.
+      This element was generated on Tue Oct 17 18:20:53 CST 2017.
     -->
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="cid" jdbcType="VARCHAR" property="cid" />
@@ -17,12 +17,13 @@
     <result column="attachment" jdbcType="INTEGER" property="attachment" />
     <result column="cuid" jdbcType="VARCHAR" property="cuid" />
     <result column="customer_status" jdbcType="INTEGER" property="customerStatus" />
+    <result column="contact_info" jdbcType="VARCHAR" property="contactInfo" />
   </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 Tue Oct 17 14:55:38 CST 2017.
+      This element was generated on Tue Oct 17 18:20:53 CST 2017.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -56,7 +57,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 17 14:55:38 CST 2017.
+      This element was generated on Tue Oct 17 18:20:53 CST 2017.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -90,16 +91,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 17 14:55:38 CST 2017.
+      This element was generated on Tue Oct 17 18:20:53 CST 2017.
     -->
     id, cid, aid, follow_date, tm_stamp, follow_result, follow_situation, attachment, 
-    cuid, customer_status
+    cuid, customer_status, contact_info
   </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 Tue Oct 17 14:55:38 CST 2017.
+      This element was generated on Tue Oct 17 18:20:53 CST 2017.
     -->
     select
     <if test="distinct">
@@ -118,7 +119,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 17 14:55:38 CST 2017.
+      This element was generated on Tue Oct 17 18:20:53 CST 2017.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -129,7 +130,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 17 14:55:38 CST 2017.
+      This element was generated on Tue Oct 17 18:20:53 CST 2017.
     -->
     delete from follow_up_record
     where id = #{id,jdbcType=VARCHAR}
@@ -138,7 +139,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 17 14:55:38 CST 2017.
+      This element was generated on Tue Oct 17 18:20:53 CST 2017.
     -->
     delete from follow_up_record
     <if test="_parameter != null">
@@ -149,22 +150,22 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 17 14:55:38 CST 2017.
+      This element was generated on Tue Oct 17 18:20:53 CST 2017.
     -->
     insert into follow_up_record (id, cid, aid, 
       follow_date, tm_stamp, follow_result, 
       follow_situation, attachment, cuid, 
-      customer_status)
+      customer_status, contact_info)
     values (#{id,jdbcType=VARCHAR}, #{cid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
       #{followDate,jdbcType=TIMESTAMP}, #{tmStamp,jdbcType=TIMESTAMP}, #{followResult,jdbcType=VARCHAR}, 
       #{followSituation,jdbcType=INTEGER}, #{attachment,jdbcType=INTEGER}, #{cuid,jdbcType=VARCHAR}, 
-      #{customerStatus,jdbcType=INTEGER})
+      #{customerStatus,jdbcType=INTEGER}, #{contactInfo,jdbcType=VARCHAR})
   </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 Tue Oct 17 14:55:38 CST 2017.
+      This element was generated on Tue Oct 17 18:20:53 CST 2017.
     -->
     insert into follow_up_record
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -198,6 +199,9 @@
       <if test="customerStatus != null">
         customer_status,
       </if>
+      <if test="contactInfo != null">
+        contact_info,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -230,13 +234,16 @@
       <if test="customerStatus != null">
         #{customerStatus,jdbcType=INTEGER},
       </if>
+      <if test="contactInfo != null">
+        #{contactInfo,jdbcType=VARCHAR},
+      </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 Tue Oct 17 14:55:38 CST 2017.
+      This element was generated on Tue Oct 17 18:20:53 CST 2017.
     -->
     select count(*) from follow_up_record
     <if test="_parameter != null">
@@ -247,7 +254,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 17 14:55:38 CST 2017.
+      This element was generated on Tue Oct 17 18:20:53 CST 2017.
     -->
     update follow_up_record
     <set>
@@ -281,6 +288,9 @@
       <if test="record.customerStatus != null">
         customer_status = #{record.customerStatus,jdbcType=INTEGER},
       </if>
+      <if test="record.contactInfo != null">
+        contact_info = #{record.contactInfo,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -290,7 +300,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 17 14:55:38 CST 2017.
+      This element was generated on Tue Oct 17 18:20:53 CST 2017.
     -->
     update follow_up_record
     set id = #{record.id,jdbcType=VARCHAR},
@@ -302,7 +312,8 @@
       follow_situation = #{record.followSituation,jdbcType=INTEGER},
       attachment = #{record.attachment,jdbcType=INTEGER},
       cuid = #{record.cuid,jdbcType=VARCHAR},
-      customer_status = #{record.customerStatus,jdbcType=INTEGER}
+      customer_status = #{record.customerStatus,jdbcType=INTEGER},
+      contact_info = #{record.contactInfo,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -311,7 +322,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 17 14:55:38 CST 2017.
+      This element was generated on Tue Oct 17 18:20:53 CST 2017.
     -->
     update follow_up_record
     <set>
@@ -342,6 +353,9 @@
       <if test="customerStatus != null">
         customer_status = #{customerStatus,jdbcType=INTEGER},
       </if>
+      <if test="contactInfo != null">
+        contact_info = #{contactInfo,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -349,7 +363,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 17 14:55:38 CST 2017.
+      This element was generated on Tue Oct 17 18:20:53 CST 2017.
     -->
     update follow_up_record
     set cid = #{cid,jdbcType=VARCHAR},
@@ -360,7 +374,20 @@
       follow_situation = #{followSituation,jdbcType=INTEGER},
       attachment = #{attachment,jdbcType=INTEGER},
       cuid = #{cuid,jdbcType=VARCHAR},
-      customer_status = #{customerStatus,jdbcType=INTEGER}
+      customer_status = #{customerStatus,jdbcType=INTEGER},
+      contact_info = #{contactInfo,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
+  <select id="listFollowUpRecord" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.FollowUpRecordOut">
+  	select 
+		a.follow_date as followDate,
+		a.follow_result as followResult, 
+		a.follow_situation as followSituation,
+		a.customer_status as customerStatus,
+		a.attachment,
+		a.contact_info as contactInfo,
+		b.name as contactName
+	from follow_up_record a left join customer_user_info b on a.cuid = b.id
+	where a.cid = #{cid,jdbcType=VARCHAR}
+  </select>
 </mapper>

+ 53 - 30
src/main/java/com/goafanti/common/model/FollowUpRecord.java

@@ -6,59 +6,64 @@ public class FollowUpRecord {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column follow_up_record.id
-	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	private String followResult;
 	/**
 	 * 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
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	private Integer followSituation;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column follow_up_record.attachment
-	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	private Integer customerStatus;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column follow_up_record.contact_info
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
+	 */
+	private String contactInfo;
 
 	/**
 	 * 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public String getId() {
 		return id;
@@ -67,7 +72,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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public void setId(String id) {
 		this.id = id;
@@ -76,7 +81,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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public String getCid() {
 		return cid;
@@ -85,7 +90,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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public void setCid(String cid) {
 		this.cid = cid;
@@ -94,7 +99,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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public String getAid() {
 		return aid;
@@ -103,7 +108,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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public void setAid(String aid) {
 		this.aid = aid;
@@ -112,7 +117,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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public Date getFollowDate() {
 		return followDate;
@@ -121,7 +126,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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public void setFollowDate(Date followDate) {
 		this.followDate = followDate;
@@ -130,7 +135,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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public Date getTmStamp() {
 		return tmStamp;
@@ -139,7 +144,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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public void setTmStamp(Date tmStamp) {
 		this.tmStamp = tmStamp;
@@ -148,7 +153,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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public String getFollowResult() {
 		return followResult;
@@ -157,7 +162,7 @@ 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public void setFollowResult(String followResult) {
 		this.followResult = followResult;
@@ -166,7 +171,7 @@ public class FollowUpRecord {
 	/**
 	 * 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
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public Integer getFollowSituation() {
 		return followSituation;
@@ -175,7 +180,7 @@ public class FollowUpRecord {
 	/**
 	 * 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
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public void setFollowSituation(Integer followSituation) {
 		this.followSituation = followSituation;
@@ -184,7 +189,7 @@ public class FollowUpRecord {
 	/**
 	 * 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public Integer getAttachment() {
 		return attachment;
@@ -193,7 +198,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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public void setAttachment(Integer attachment) {
 		this.attachment = attachment;
@@ -202,7 +207,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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public String getCuid() {
 		return cuid;
@@ -211,7 +216,7 @@ 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public void setCuid(String cuid) {
 		this.cuid = cuid;
@@ -220,7 +225,7 @@ public class FollowUpRecord {
 	/**
 	 * 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
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public Integer getCustomerStatus() {
 		return customerStatus;
@@ -229,9 +234,27 @@ public class FollowUpRecord {
 	/**
 	 * 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
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public void setCustomerStatus(Integer customerStatus) {
 		this.customerStatus = customerStatus;
 	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column follow_up_record.contact_info
+	 * @return  the value of follow_up_record.contact_info
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
+	 */
+	public String getContactInfo() {
+		return contactInfo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column follow_up_record.contact_info
+	 * @param contactInfo  the value for follow_up_record.contact_info
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
+	 */
+	public void setContactInfo(String contactInfo) {
+		this.contactInfo = contactInfo;
+	}
 }

+ 86 - 16
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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table follow_up_record
-	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table follow_up_record
-	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 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  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -812,11 +812,81 @@ public class FollowUpRecordExample {
 			addCriterion("customer_status not between", value1, value2, "customerStatus");
 			return (Criteria) this;
 		}
+
+		public Criteria andContactInfoIsNull() {
+			addCriterion("contact_info is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactInfoIsNotNull() {
+			addCriterion("contact_info is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactInfoEqualTo(String value) {
+			addCriterion("contact_info =", value, "contactInfo");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactInfoNotEqualTo(String value) {
+			addCriterion("contact_info <>", value, "contactInfo");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactInfoGreaterThan(String value) {
+			addCriterion("contact_info >", value, "contactInfo");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactInfoGreaterThanOrEqualTo(String value) {
+			addCriterion("contact_info >=", value, "contactInfo");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactInfoLessThan(String value) {
+			addCriterion("contact_info <", value, "contactInfo");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactInfoLessThanOrEqualTo(String value) {
+			addCriterion("contact_info <=", value, "contactInfo");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactInfoLike(String value) {
+			addCriterion("contact_info like", value, "contactInfo");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactInfoNotLike(String value) {
+			addCriterion("contact_info not like", value, "contactInfo");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactInfoIn(List<String> values) {
+			addCriterion("contact_info in", values, "contactInfo");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactInfoNotIn(List<String> values) {
+			addCriterion("contact_info not in", values, "contactInfo");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactInfoBetween(String value1, String value2) {
+			addCriterion("contact_info between", value1, value2, "contactInfo");
+			return (Criteria) this;
+		}
+
+		public Criteria andContactInfoNotBetween(String value1, String value2) {
+			addCriterion("contact_info not between", value1, value2, "contactInfo");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table follow_up_record
-	 * @mbg.generated  Tue Oct 17 14:55:38 CST 2017
+	 * @mbg.generated  Tue Oct 17 18:20:53 CST 2017
 	 */
 	public static class Criterion {
 		private String condition;

+ 1 - 1
src/main/java/com/goafanti/customer/bo/CustomerIn.java

@@ -4,7 +4,7 @@ package com.goafanti.customer.bo;
 public class CustomerIn {
 	/** 客户编号 **/
 	private String id;
-	/** 跟进编号 **/
+	/** 跟进记录编号 **/
 	private String followId;
 	/** 客户编号 **/
 	private String cuid;

+ 106 - 0
src/main/java/com/goafanti/customer/bo/FollowUpRecordOut.java

@@ -0,0 +1,106 @@
+package com.goafanti.customer.bo;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.enums.CustomerFollowFiled;
+import com.goafanti.common.enums.CustomerStatusFiled;
+
+public class FollowUpRecordOut {
+	/** 跟进时间 **/
+	private Date followDate;
+	/** 跟进时间 **/
+	private String _followDate;
+	/** 跟进人 **/
+	private String adminName;
+	/** 客户名 **/
+	private String contactName;
+	/** 联系信息 **/
+	private String contactInfo;
+	/** 跟进状态 **/
+	private Integer followSituation;
+	/** 跟进状态 **/
+	private String _followSituation;
+	/** 客户状态 **/
+	private Integer customerStatus;
+	/** 客户状态 **/
+	private String _customerStatus;
+	/** 附件地址 **/
+	private String attachment;
+	/** 跟进结果 **/
+	private String followResult;
+	
+	public String get_followDate() {
+		SimpleDateFormat format = new SimpleDateFormat(AFTConstants.YYYYMMDDHHMMSS);
+		return StringUtils.isBlank(_followDate)?format.format(getFollowDate()):_followDate;
+	}
+	public void set_followDate(String _followDate) {
+		this._followDate = _followDate;
+	}
+	public String getAdminName() {
+		return adminName;
+	}
+	public void setAdminName(String adminName) {
+		this.adminName = adminName;
+	}
+	public String getContactName() {
+		return contactName;
+	}
+	public void setContactName(String contactName) {
+		this.contactName = contactName;
+	}
+	public String getContactInfo() {
+		return contactInfo;
+	}
+	public void setContactInfo(String contactInfo) {
+		this.contactInfo = contactInfo;
+	}
+	public Integer getFollowSituation() {
+		return followSituation;
+	}
+	public void setFollowSituation(Integer followSituation) {
+		this.followSituation = followSituation;
+	}
+	public String get_followSituation() {
+		return StringUtils.isBlank(_followSituation)?
+				CustomerFollowFiled.getFieldDesc(getFollowSituation()):_followSituation;
+	}
+	public void set_followSituation(String _followSituation) {
+		this._followSituation = _followSituation;
+	}
+	public Date getFollowDate() {
+		return followDate;
+	}
+	public void setFollowDate(Date followDate) {
+		this.followDate = followDate;
+	}
+	public Integer getCustomerStatus() {
+		return customerStatus;
+	}
+	public void setCustomerStatus(Integer customerStatus) {
+		this.customerStatus = customerStatus;
+	}
+	public String get_customerStatus() {
+		return StringUtils.isBlank(_customerStatus)?
+				CustomerStatusFiled.getFieldDesc(getCustomerStatus()):_customerStatus;
+	}
+	public void set_customerStatus(String _customerStatus) {
+		this._customerStatus = _customerStatus;
+	}
+	public String getAttachment() {
+		return attachment;
+	}
+	public void setAttachment(String attachment) {
+		this.attachment = attachment;
+	}
+	public String getFollowResult() {
+		return followResult;
+	}
+	public void setFollowResult(String followResult) {
+		this.followResult = followResult;
+	}
+	
+}

+ 1 - 2
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -312,7 +312,6 @@ public class AdminCustomerApiController extends BaseController {
 		Result res= new Result();
 		res.setData(followUpService.listFollowUpRecord(customerId));
 		return res;
-	}
-	
+	}	
 	
 }

+ 6 - 1
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -65,6 +65,11 @@ public interface CustomerService {
 	 */
 	public int updateCustomer(Customer c);
 	
-	
+	/**
+	 * 
+	 * @param id
+	 * @return 查询公司基本信息
+	 */
+	public CustomerOut findCustomerBaseInfo(String id);
 	
 }

+ 10 - 0
src/main/java/com/goafanti/customer/service/FollowUpService.java

@@ -1,7 +1,10 @@
 package com.goafanti.customer.service;
 
+import java.util.List;
+
 import com.goafanti.common.model.FollowUpRecord;
 import com.goafanti.customer.bo.CustomerIn;
+import com.goafanti.customer.bo.FollowUpRecordOut;
 
 public interface FollowUpService {
 	/**
@@ -10,4 +13,11 @@ public interface FollowUpService {
 	 * @return
 	 */
 	int addFollowUp(FollowUpRecord fur,CustomerIn cusIn);
+	
+	/**
+	 * 查看跟进记录列表
+	 * @param customerId
+	 * @return
+	 */
+	List<FollowUpRecordOut> listFollowUpRecord(String customerId);
 }

+ 2 - 0
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -1,11 +1,13 @@
 package com.goafanti.customer.service.impl;
 
+import java.lang.reflect.InvocationTargetException;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
+import org.apache.commons.beanutils.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.goafanti.core.mybatis.BaseMybatisDao;

+ 9 - 0
src/main/java/com/goafanti/customer/service/impl/FollowUpServiceImp.java

@@ -1,6 +1,8 @@
 package com.goafanti.customer.service.impl;
 
 
+import java.util.List;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -10,6 +12,7 @@ import com.goafanti.common.model.FollowUpRecord;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.customer.bo.CustomerIn;
+import com.goafanti.customer.bo.FollowUpRecordOut;
 import com.goafanti.customer.service.FollowUpService;
 @Service
 public class FollowUpServiceImp extends BaseMybatisDao<CustomerUserInfoMapper>  implements FollowUpService{
@@ -21,5 +24,11 @@ public class FollowUpServiceImp extends BaseMybatisDao<CustomerUserInfoMapper>
 		fur.setAid(TokenManager.getAdminId());
 		return followUpRecordMapper.insert(fur);
 	}
+	
+	@Override
+	public List<FollowUpRecordOut> listFollowUpRecord(String customerId) {
+		
+		return followUpRecordMapper.listFollowUpRecord(customerId);
+	}
 
 }