wanghui лет назад: 8
Родитель
Сommit
a6512df991
23 измененных файлов с 1948 добавлено и 509 удалено
  1. 2 1
      generatorConfig.xml
  2. 8 0
      src/main/java/com/goafanti/common/constant/AFTConstants.java
  3. 11 11
      src/main/java/com/goafanti/common/dao/CustomerLogMapper.java
  4. 60 0
      src/main/java/com/goafanti/common/dao/CustomerOrganizationInfoMapper.java
  5. 70 0
      src/main/java/com/goafanti/common/dao/CustomerUserInfoMapper.java
  6. 62 0
      src/main/java/com/goafanti/common/enums/CustomerFollowFiled.java
  7. 64 0
      src/main/java/com/goafanti/common/enums/CustomerIntentionFiled.java
  8. 57 0
      src/main/java/com/goafanti/common/enums/CustomerStatusFiled.java
  9. 126 76
      src/main/java/com/goafanti/common/mapper/CustomerLogMapper.xml
  10. 5 2
      src/main/java/com/goafanti/common/mapper/CustomerMapper.xml
  11. 254 19
      src/main/java/com/goafanti/common/mapper/CustomerOrganizationInfoMapper.xml
  12. 274 21
      src/main/java/com/goafanti/common/mapper/CustomerUserInfoMapper.xml
  13. 151 80
      src/main/java/com/goafanti/common/model/CustomerLog.java
  14. 357 156
      src/main/java/com/goafanti/common/model/CustomerLogExample.java
  15. 51 33
      src/main/java/com/goafanti/common/model/CustomerOrganizationInfo.java
  16. 86 16
      src/main/java/com/goafanti/common/model/CustomerOrganizationInfoExample.java
  17. 68 45
      src/main/java/com/goafanti/common/model/CustomerUserInfo.java
  18. 86 16
      src/main/java/com/goafanti/common/model/CustomerUserInfoExample.java
  19. 22 1
      src/main/java/com/goafanti/customer/bo/CustomerIn.java
  20. 19 6
      src/main/java/com/goafanti/customer/bo/CustomerOut.java
  21. 22 24
      src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java
  22. 22 1
      src/main/java/com/goafanti/customer/service/CustomerService.java
  23. 71 1
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

+ 2 - 1
generatorConfig.xml

@@ -8,6 +8,7 @@
     <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"/>
+    <table schema="aft" tableName="customer_user_info"/>
+    <table schema="aft" tableName="customer_organization_info"/>
   </context>
 </generatorConfiguration>

+ 8 - 0
src/main/java/com/goafanti/common/constant/AFTConstants.java

@@ -60,4 +60,12 @@ public class AFTConstants {
 	public static final Integer	INTERNATIONAL_ORG_CACHE_KEY			= 672;
 
 	public static final String	YES									= "1";
+	
+	public static final String CUSTOMER_CREATE						= "创建客户";
+	
+	public static final String CUSTOMER_DELETE						= "删除客户";
+	
+	public static final String CUSTOMER_TRANSFER					= "转交客户";
+	
+	public static final String CUSTOMER_MODIFY						= "修改客户资料";
 }

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

@@ -9,67 +9,67 @@ public interface CustomerLogMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	long countByExample(CustomerLogExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	int deleteByExample(CustomerLogExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	int deleteByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	int insert(CustomerLog record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	int insertSelective(CustomerLog record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	List<CustomerLog> selectByExample(CustomerLogExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	CustomerLog selectByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	int updateByExampleSelective(@Param("record") CustomerLog record, @Param("example") CustomerLogExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	int updateByExample(@Param("record") CustomerLog record, @Param("example") CustomerLogExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	int updateByPrimaryKeySelective(CustomerLog record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	int updateByPrimaryKey(CustomerLog record);
 }

+ 60 - 0
src/main/java/com/goafanti/common/dao/CustomerOrganizationInfoMapper.java

@@ -1,11 +1,71 @@
 package com.goafanti.common.dao;
 
 import com.goafanti.common.model.CustomerOrganizationInfo;
+import com.goafanti.common.model.CustomerOrganizationInfoExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
 
 public interface CustomerOrganizationInfoMapper {
 
 
 	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	long countByExample(CustomerOrganizationInfoExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	int deleteByExample(CustomerOrganizationInfoExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	int deleteByPrimaryKey(String id);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	int insert(CustomerOrganizationInfo record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	int insertSelective(CustomerOrganizationInfo record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	List<CustomerOrganizationInfo> selectByExample(CustomerOrganizationInfoExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	CustomerOrganizationInfo selectByPrimaryKey(String id);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	int updateByExampleSelective(@Param("record") CustomerOrganizationInfo record,
+			@Param("example") CustomerOrganizationInfoExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	int updateByExample(@Param("record") CustomerOrganizationInfo record,
+			@Param("example") CustomerOrganizationInfoExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	int updateByPrimaryKeySelective(CustomerOrganizationInfo record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	int updateByPrimaryKey(CustomerOrganizationInfo record);
+	/**
 	 * 删除
 	 */
 	int deleteCustomerOrganizationByCid(String cid);

+ 70 - 0
src/main/java/com/goafanti/common/dao/CustomerUserInfoMapper.java

@@ -1,11 +1,81 @@
 package com.goafanti.common.dao;
 
 import com.goafanti.common.model.CustomerUserInfo;
+import com.goafanti.common.model.CustomerUserInfoExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
 
 public interface CustomerUserInfoMapper {
 
 
 	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	long countByExample(CustomerUserInfoExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	int deleteByExample(CustomerUserInfoExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	int deleteByPrimaryKey(String id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	int insert(CustomerUserInfo record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	int insertSelective(CustomerUserInfo record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	List<CustomerUserInfo> selectByExample(CustomerUserInfoExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	CustomerUserInfo selectByPrimaryKey(String id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	int updateByExampleSelective(@Param("record") CustomerUserInfo record,
+			@Param("example") CustomerUserInfoExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	int updateByExample(@Param("record") CustomerUserInfo record, @Param("example") CustomerUserInfoExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	int updateByPrimaryKeySelective(CustomerUserInfo record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	int updateByPrimaryKey(CustomerUserInfo record);
+
+	/**
 	 * 删除
 	 */
 	int deleteCustomerUserByCid(String cid);

+ 62 - 0
src/main/java/com/goafanti/common/enums/CustomerFollowFiled.java

@@ -0,0 +1,62 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum CustomerFollowFiled {
+	/**已发项目介绍资料  **/
+	FOLLOW_CREATE(0,"已发项目介绍资料"),
+	/** 已约面谈 **/
+	FOLLOW_INTERVIEW(1,"已约面谈"),
+	/** 已发合同计划书  **/
+	FOLLOW_PROSPECT_SEND(2,"已发合同计划书"),
+	/** 已报价  **/
+	FOLLOW_QUOTE(3,"已报价"),
+	/** 已发合同 **/
+	FOLLOW_CONTRACT_SEND(4,"已发合同"),
+	/** 已签合同**/
+	FOLLOW_CONTRACT_SIGN(5,"已签合同"),
+	/** 面谈中**/
+	FOLLOW_CONTRACT_INTERVIEW(6,"面谈中"),
+	/** 已面签 **/
+	FOLLOW_THE_INTERVIEW(6,"已面签"),
+	/** 未知  **/
+	OTHER(-1,"未知");
+	
+	private static Map<Integer, CustomerFollowFiled> status = new HashMap<Integer, CustomerFollowFiled>();
+
+	static {
+		for (CustomerFollowFiled value : CustomerFollowFiled.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static CustomerFollowFiled getField(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return OTHER;
+	}
+
+	public static String getFieldDesc(Integer code) {
+		return getField(code).getDesc();
+	}
+
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+	
+	private CustomerFollowFiled(Integer code,String desc){
+		this.code = code;
+		this.desc = desc;
+	};
+	
+	private Integer code;
+	private String desc;
+	public Integer getCode() {
+		return code;
+	}
+	public String getDesc() {
+		return desc;
+	} 
+}

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

@@ -0,0 +1,64 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum CustomerIntentionFiled {
+	/** 发明专利 **/
+	intention_invention(0,"发明专利"),
+	/** 实用型新型专利 **/
+	intention_practical(1,"实用型新型专利"),
+	/** 外观专利 **/
+	intention_appearance(2,"外观专利"),
+	/** 软件著作权  **/
+	intention_soft(3,"软件著作权"),
+	/** 知识产权贯标  **/
+	intention_property(4,"知识产权贯标"),
+	/** 高企认定  **/
+	intention_cognizance(5,"高企认定"),
+	/** 技术成果  **/
+	intention_achievement(6,"技术成果"),
+	/** 技术需求  **/
+	intention_demand(7,"技术需求"),
+	/** 专家咨询  **/
+	intention_consultation(8,"专家咨询"),
+	/** 未知  **/
+	OTHER(-1,"未知");
+	
+	private static Map<Integer, CustomerIntentionFiled> status = new HashMap<Integer, CustomerIntentionFiled>();
+
+	static {
+		for (CustomerIntentionFiled value : CustomerIntentionFiled.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static CustomerIntentionFiled getField(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return OTHER;
+	}
+
+	public static String getFieldDesc(Integer code) {
+		return getField(code).getDesc();
+	}
+
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+	
+	private CustomerIntentionFiled(Integer code,String desc){
+		this.code = code;
+		this.desc = desc;
+	};
+	private Integer code;
+	private String desc;
+	public Integer getCode() {
+		return code;
+	}
+	public String getDesc() {
+		return desc;
+	}
+	
+}

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

@@ -0,0 +1,57 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum CustomerStatusFiled {
+	/** 新客户 **/
+	status_new(0,"新客户"),
+	/** 意向客户 **/
+	status_intention(1,"意向客户"),
+	/** 重点客户 **/
+	status_point(2,"重点客户"),
+	/** 面谈客户  **/
+	status_interview(3,"面谈客户"),
+	/** 签单客户 **/
+	status_sign(4,"签单客户"),
+	/** 拒绝客户 **/
+	status_refuse(4,"拒绝客户"),
+	/** 未知  **/
+	OTHER(-1,"未知");
+	
+	private static Map<Integer, CustomerStatusFiled> status = new HashMap<Integer, CustomerStatusFiled>();
+
+	static {
+		for (CustomerStatusFiled value : CustomerStatusFiled.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static CustomerStatusFiled getField(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return OTHER;
+	}
+
+	public static String getFieldDesc(Integer code) {
+		return getField(code).getDesc();
+	}
+
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+	private CustomerStatusFiled(Integer code,String desc){
+		this.code = code;
+		this.desc = desc;
+	};
+	
+	private Integer code;
+	private String desc;
+	public Integer getCode() {
+		return code;
+	}
+	public String getDesc() {
+		return desc;
+	} 
+}

+ 126 - 76
src/main/java/com/goafanti/common/mapper/CustomerLogMapper.xml

@@ -5,16 +5,19 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 10 10:28:39 CST 2017.
+      This element was generated on Fri Oct 13 16:56:48 CST 2017.
     -->
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="cid" jdbcType="VARCHAR" property="cid" />
     <result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
-    <result column="operator_typ" jdbcType="CHAR" property="operatorTyp" />
-    <result column="operator_datetime" jdbcType="VARCHAR" property="operatorDatetime" />
-    <result column="before_status" jdbcType="VARCHAR" property="beforeStatus" />
-    <result column="before_service" jdbcType="VARCHAR" property="beforeService" />
-    <result column="after_service" jdbcType="VARCHAR" property="afterService" />
+    <result column="operator_type" jdbcType="VARCHAR" property="operatorType" />
+    <result column="operator_time" jdbcType="TIMESTAMP" property="operatorTime" />
+    <result column="before_customer_status" jdbcType="VARCHAR" property="beforeCustomerStatus" />
+    <result column="after_customer_status" jdbcType="VARCHAR" property="afterCustomerStatus" />
+    <result column="before_customer_intention" jdbcType="VARCHAR" property="beforeCustomerIntention" />
+    <result column="after_customer_intention" jdbcType="VARCHAR" property="afterCustomerIntention" />
+    <result column="before_follow_situation" jdbcType="VARCHAR" property="beforeFollowSituation" />
+    <result column="after_follow_situation" jdbcType="VARCHAR" property="afterFollowSituation" />
     <result column="before_admin_name" jdbcType="VARCHAR" property="beforeAdminName" />
     <result column="after_admin_name" jdbcType="VARCHAR" property="afterAdminName" />
   </resultMap>
@@ -22,7 +25,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 10 10:28:39 CST 2017.
+      This element was generated on Fri Oct 13 16:56:48 CST 2017.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -56,7 +59,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 10 10:28:39 CST 2017.
+      This element was generated on Fri Oct 13 16:56:48 CST 2017.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -90,16 +93,17 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 10 10:28:39 CST 2017.
+      This element was generated on Fri Oct 13 16:56:48 CST 2017.
     -->
-    id, cid, operator_name, operator_typ, operator_datetime, before_status, before_service, 
-    after_service, before_admin_name, after_admin_name
+    id, cid, operator_name, operator_type, operator_time, before_customer_status, after_customer_status, 
+    before_customer_intention, after_customer_intention, before_follow_situation, after_follow_situation, 
+    before_admin_name, after_admin_name
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.CustomerLogExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 10 10:28:39 CST 2017.
+      This element was generated on Fri Oct 13 16:56:48 CST 2017.
     -->
     select
     <if test="distinct">
@@ -118,7 +122,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 10 10:28:39 CST 2017.
+      This element was generated on Fri Oct 13 16:56:48 CST 2017.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -129,7 +133,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 10 10:28:39 CST 2017.
+      This element was generated on Fri Oct 13 16:56:48 CST 2017.
     -->
     delete from customer_log
     where id = #{id,jdbcType=VARCHAR}
@@ -138,7 +142,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 10 10:28:39 CST 2017.
+      This element was generated on Fri Oct 13 16:56:48 CST 2017.
     -->
     delete from customer_log
     <if test="_parameter != null">
@@ -149,22 +153,26 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 10 10:28:39 CST 2017.
+      This element was generated on Fri Oct 13 16:56:48 CST 2017.
     -->
     insert into customer_log (id, cid, operator_name, 
-      operator_typ, operator_datetime, before_status, 
-      before_service, after_service, before_admin_name, 
+      operator_type, operator_time, before_customer_status, 
+      after_customer_status, before_customer_intention, 
+      after_customer_intention, before_follow_situation, 
+      after_follow_situation, before_admin_name, 
       after_admin_name)
     values (#{id,jdbcType=VARCHAR}, #{cid,jdbcType=VARCHAR}, #{operatorName,jdbcType=VARCHAR}, 
-      #{operatorTyp,jdbcType=CHAR}, #{operatorDatetime,jdbcType=VARCHAR}, #{beforeStatus,jdbcType=VARCHAR}, 
-      #{beforeService,jdbcType=VARCHAR}, #{afterService,jdbcType=VARCHAR}, #{beforeAdminName,jdbcType=VARCHAR}, 
+      #{operatorType,jdbcType=VARCHAR}, #{operatorTime,jdbcType=TIMESTAMP}, #{beforeCustomerStatus,jdbcType=VARCHAR}, 
+      #{afterCustomerStatus,jdbcType=VARCHAR}, #{beforeCustomerIntention,jdbcType=VARCHAR}, 
+      #{afterCustomerIntention,jdbcType=VARCHAR}, #{beforeFollowSituation,jdbcType=VARCHAR}, 
+      #{afterFollowSituation,jdbcType=VARCHAR}, #{beforeAdminName,jdbcType=VARCHAR}, 
       #{afterAdminName,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.CustomerLog">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 10 10:28:39 CST 2017.
+      This element was generated on Fri Oct 13 16:56:48 CST 2017.
     -->
     insert into customer_log
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -177,20 +185,29 @@
       <if test="operatorName != null">
         operator_name,
       </if>
-      <if test="operatorTyp != null">
-        operator_typ,
+      <if test="operatorType != null">
+        operator_type,
       </if>
-      <if test="operatorDatetime != null">
-        operator_datetime,
+      <if test="operatorTime != null">
+        operator_time,
       </if>
-      <if test="beforeStatus != null">
-        before_status,
+      <if test="beforeCustomerStatus != null">
+        before_customer_status,
       </if>
-      <if test="beforeService != null">
-        before_service,
+      <if test="afterCustomerStatus != null">
+        after_customer_status,
       </if>
-      <if test="afterService != null">
-        after_service,
+      <if test="beforeCustomerIntention != null">
+        before_customer_intention,
+      </if>
+      <if test="afterCustomerIntention != null">
+        after_customer_intention,
+      </if>
+      <if test="beforeFollowSituation != null">
+        before_follow_situation,
+      </if>
+      <if test="afterFollowSituation != null">
+        after_follow_situation,
       </if>
       <if test="beforeAdminName != null">
         before_admin_name,
@@ -209,20 +226,29 @@
       <if test="operatorName != null">
         #{operatorName,jdbcType=VARCHAR},
       </if>
-      <if test="operatorTyp != null">
-        #{operatorTyp,jdbcType=CHAR},
+      <if test="operatorType != null">
+        #{operatorType,jdbcType=VARCHAR},
+      </if>
+      <if test="operatorTime != null">
+        #{operatorTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="beforeCustomerStatus != null">
+        #{beforeCustomerStatus,jdbcType=VARCHAR},
+      </if>
+      <if test="afterCustomerStatus != null">
+        #{afterCustomerStatus,jdbcType=VARCHAR},
       </if>
-      <if test="operatorDatetime != null">
-        #{operatorDatetime,jdbcType=VARCHAR},
+      <if test="beforeCustomerIntention != null">
+        #{beforeCustomerIntention,jdbcType=VARCHAR},
       </if>
-      <if test="beforeStatus != null">
-        #{beforeStatus,jdbcType=VARCHAR},
+      <if test="afterCustomerIntention != null">
+        #{afterCustomerIntention,jdbcType=VARCHAR},
       </if>
-      <if test="beforeService != null">
-        #{beforeService,jdbcType=VARCHAR},
+      <if test="beforeFollowSituation != null">
+        #{beforeFollowSituation,jdbcType=VARCHAR},
       </if>
-      <if test="afterService != null">
-        #{afterService,jdbcType=VARCHAR},
+      <if test="afterFollowSituation != null">
+        #{afterFollowSituation,jdbcType=VARCHAR},
       </if>
       <if test="beforeAdminName != null">
         #{beforeAdminName,jdbcType=VARCHAR},
@@ -236,7 +262,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 10 10:28:39 CST 2017.
+      This element was generated on Fri Oct 13 16:56:48 CST 2017.
     -->
     select count(*) from customer_log
     <if test="_parameter != null">
@@ -247,7 +273,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 10 10:28:39 CST 2017.
+      This element was generated on Fri Oct 13 16:56:48 CST 2017.
     -->
     update customer_log
     <set>
@@ -260,20 +286,29 @@
       <if test="record.operatorName != null">
         operator_name = #{record.operatorName,jdbcType=VARCHAR},
       </if>
-      <if test="record.operatorTyp != null">
-        operator_typ = #{record.operatorTyp,jdbcType=CHAR},
+      <if test="record.operatorType != null">
+        operator_type = #{record.operatorType,jdbcType=VARCHAR},
       </if>
-      <if test="record.operatorDatetime != null">
-        operator_datetime = #{record.operatorDatetime,jdbcType=VARCHAR},
+      <if test="record.operatorTime != null">
+        operator_time = #{record.operatorTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="record.beforeStatus != null">
-        before_status = #{record.beforeStatus,jdbcType=VARCHAR},
+      <if test="record.beforeCustomerStatus != null">
+        before_customer_status = #{record.beforeCustomerStatus,jdbcType=VARCHAR},
       </if>
-      <if test="record.beforeService != null">
-        before_service = #{record.beforeService,jdbcType=VARCHAR},
+      <if test="record.afterCustomerStatus != null">
+        after_customer_status = #{record.afterCustomerStatus,jdbcType=VARCHAR},
       </if>
-      <if test="record.afterService != null">
-        after_service = #{record.afterService,jdbcType=VARCHAR},
+      <if test="record.beforeCustomerIntention != null">
+        before_customer_intention = #{record.beforeCustomerIntention,jdbcType=VARCHAR},
+      </if>
+      <if test="record.afterCustomerIntention != null">
+        after_customer_intention = #{record.afterCustomerIntention,jdbcType=VARCHAR},
+      </if>
+      <if test="record.beforeFollowSituation != null">
+        before_follow_situation = #{record.beforeFollowSituation,jdbcType=VARCHAR},
+      </if>
+      <if test="record.afterFollowSituation != null">
+        after_follow_situation = #{record.afterFollowSituation,jdbcType=VARCHAR},
       </if>
       <if test="record.beforeAdminName != null">
         before_admin_name = #{record.beforeAdminName,jdbcType=VARCHAR},
@@ -290,17 +325,20 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 10 10:28:39 CST 2017.
+      This element was generated on Fri Oct 13 16:56:48 CST 2017.
     -->
     update customer_log
     set id = #{record.id,jdbcType=VARCHAR},
       cid = #{record.cid,jdbcType=VARCHAR},
       operator_name = #{record.operatorName,jdbcType=VARCHAR},
-      operator_typ = #{record.operatorTyp,jdbcType=CHAR},
-      operator_datetime = #{record.operatorDatetime,jdbcType=VARCHAR},
-      before_status = #{record.beforeStatus,jdbcType=VARCHAR},
-      before_service = #{record.beforeService,jdbcType=VARCHAR},
-      after_service = #{record.afterService,jdbcType=VARCHAR},
+      operator_type = #{record.operatorType,jdbcType=VARCHAR},
+      operator_time = #{record.operatorTime,jdbcType=TIMESTAMP},
+      before_customer_status = #{record.beforeCustomerStatus,jdbcType=VARCHAR},
+      after_customer_status = #{record.afterCustomerStatus,jdbcType=VARCHAR},
+      before_customer_intention = #{record.beforeCustomerIntention,jdbcType=VARCHAR},
+      after_customer_intention = #{record.afterCustomerIntention,jdbcType=VARCHAR},
+      before_follow_situation = #{record.beforeFollowSituation,jdbcType=VARCHAR},
+      after_follow_situation = #{record.afterFollowSituation,jdbcType=VARCHAR},
       before_admin_name = #{record.beforeAdminName,jdbcType=VARCHAR},
       after_admin_name = #{record.afterAdminName,jdbcType=VARCHAR}
     <if test="_parameter != null">
@@ -311,7 +349,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 10 10:28:39 CST 2017.
+      This element was generated on Fri Oct 13 16:56:48 CST 2017.
     -->
     update customer_log
     <set>
@@ -321,20 +359,29 @@
       <if test="operatorName != null">
         operator_name = #{operatorName,jdbcType=VARCHAR},
       </if>
-      <if test="operatorTyp != null">
-        operator_typ = #{operatorTyp,jdbcType=CHAR},
+      <if test="operatorType != null">
+        operator_type = #{operatorType,jdbcType=VARCHAR},
+      </if>
+      <if test="operatorTime != null">
+        operator_time = #{operatorTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="beforeCustomerStatus != null">
+        before_customer_status = #{beforeCustomerStatus,jdbcType=VARCHAR},
+      </if>
+      <if test="afterCustomerStatus != null">
+        after_customer_status = #{afterCustomerStatus,jdbcType=VARCHAR},
       </if>
-      <if test="operatorDatetime != null">
-        operator_datetime = #{operatorDatetime,jdbcType=VARCHAR},
+      <if test="beforeCustomerIntention != null">
+        before_customer_intention = #{beforeCustomerIntention,jdbcType=VARCHAR},
       </if>
-      <if test="beforeStatus != null">
-        before_status = #{beforeStatus,jdbcType=VARCHAR},
+      <if test="afterCustomerIntention != null">
+        after_customer_intention = #{afterCustomerIntention,jdbcType=VARCHAR},
       </if>
-      <if test="beforeService != null">
-        before_service = #{beforeService,jdbcType=VARCHAR},
+      <if test="beforeFollowSituation != null">
+        before_follow_situation = #{beforeFollowSituation,jdbcType=VARCHAR},
       </if>
-      <if test="afterService != null">
-        after_service = #{afterService,jdbcType=VARCHAR},
+      <if test="afterFollowSituation != null">
+        after_follow_situation = #{afterFollowSituation,jdbcType=VARCHAR},
       </if>
       <if test="beforeAdminName != null">
         before_admin_name = #{beforeAdminName,jdbcType=VARCHAR},
@@ -349,16 +396,19 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Oct 10 10:28:39 CST 2017.
+      This element was generated on Fri Oct 13 16:56:48 CST 2017.
     -->
     update customer_log
     set cid = #{cid,jdbcType=VARCHAR},
       operator_name = #{operatorName,jdbcType=VARCHAR},
-      operator_typ = #{operatorTyp,jdbcType=CHAR},
-      operator_datetime = #{operatorDatetime,jdbcType=VARCHAR},
-      before_status = #{beforeStatus,jdbcType=VARCHAR},
-      before_service = #{beforeService,jdbcType=VARCHAR},
-      after_service = #{afterService,jdbcType=VARCHAR},
+      operator_type = #{operatorType,jdbcType=VARCHAR},
+      operator_time = #{operatorTime,jdbcType=TIMESTAMP},
+      before_customer_status = #{beforeCustomerStatus,jdbcType=VARCHAR},
+      after_customer_status = #{afterCustomerStatus,jdbcType=VARCHAR},
+      before_customer_intention = #{beforeCustomerIntention,jdbcType=VARCHAR},
+      after_customer_intention = #{afterCustomerIntention,jdbcType=VARCHAR},
+      before_follow_situation = #{beforeFollowSituation,jdbcType=VARCHAR},
+      after_follow_situation = #{afterFollowSituation,jdbcType=VARCHAR},
       before_admin_name = #{beforeAdminName,jdbcType=VARCHAR},
       after_admin_name = #{afterAdminName,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}

+ 5 - 2
src/main/java/com/goafanti/common/mapper/CustomerMapper.xml

@@ -419,8 +419,8 @@
   
   <select id="selectCustomer" parameterType="com.goafanti.customer.bo.CustomerIn" resultType="com.goafanti.customer.bo.CustomerOut">
     select a.id,a.customer_typ as customerTyp,a.share_typ as shareTyp,a.tag,a.follow_situation as followSituation,
-    c.name,c.mobile,c.tel_num as telNum,
-    d.location_province as locationProvince,
+    c.name as contactName,c.mobile,c.tel_num as telNum,
+    d.company_name as customerName,d.location_province as locationProvince,
     e.name as adminName
     from customer a
     left join follow_up_record b on a.follow_id = b.id 
@@ -428,6 +428,9 @@
     left join customer_organization_info d on a.id = d.cid
     left join admin e on a.aid = e.id 
     where a.effective = 0
+    <if test="aid != null">
+    	and a.aid = #{aid,jdbcType=VARCHAR}
+    </if>
     <if test="shareTyp != null">
         and a.share_typ = #{shareTyp,jdbcType=INTEGER}
     </if>

+ 254 - 19
src/main/java/com/goafanti/common/mapper/CustomerOrganizationInfoMapper.xml

@@ -2,17 +2,165 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.CustomerOrganizationInfoMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.CustomerOrganizationInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="cid" jdbcType="VARCHAR" property="cid" />
     <result column="company_name" jdbcType="VARCHAR" property="companyName" />
-    <result column="company_industry" jdbcType="VARCHAR" property="companyIndustry" />
     <result column="location_province" jdbcType="CHAR" property="locationProvince" />
     <result column="location_city" jdbcType="VARCHAR" property="locationCity" />
     <result column="location_area" jdbcType="VARCHAR" property="locationArea" />
     <result column="adress" jdbcType="VARCHAR" property="adress" />
+    <result column="company_industry" jdbcType="VARCHAR" property="companyIndustry" />
   </resultMap>
-  
-  <insert id="insertCustomerOrganization" parameterType="com.goafanti.common.model.CustomerOrganizationInfo">
+  <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 20:04:10 CST 2017.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_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 20:04:10 CST 2017.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    id, cid, company_name, location_province, location_city, location_area, adress, company_industry
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.CustomerOrganizationInfoExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from customer_organization_info
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from customer_organization_info
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    delete from customer_organization_info
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.CustomerOrganizationInfoExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    delete from customer_organization_info
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.CustomerOrganizationInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    insert into customer_organization_info (id, cid, company_name, 
+      location_province, location_city, location_area, 
+      adress, company_industry)
+    values (#{id,jdbcType=VARCHAR}, #{cid,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, 
+      #{locationProvince,jdbcType=CHAR}, #{locationCity,jdbcType=VARCHAR}, #{locationArea,jdbcType=VARCHAR}, 
+      #{adress,jdbcType=VARCHAR}, #{companyIndustry,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.CustomerOrganizationInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
     insert into customer_organization_info
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -27,9 +175,6 @@
       <if test="locationProvince != null">
         location_province,
       </if>
-      <if test="companyIndustry != null">
-        company_industry,
-      </if>
       <if test="locationCity != null">
         location_city,
       </if>
@@ -39,6 +184,9 @@
       <if test="adress != null">
         adress,
       </if>
+      <if test="companyIndustry != null">
+        company_industry,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -50,9 +198,6 @@
       <if test="companyName != null">
         #{companyName,jdbcType=VARCHAR},
       </if>
-      <if test="companyIndustry != null">
-        #{companyIndustry,jdbcType=VARCHAR},
-      </if>
       <if test="locationProvince != null">
         #{locationProvince,jdbcType=CHAR},
       </if>
@@ -65,16 +210,84 @@
       <if test="adress != null">
         #{adress,jdbcType=VARCHAR},
       </if>
+      <if test="companyIndustry != null">
+        #{companyIndustry,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
-  
-  <delete id="deleteCustomerOrganizationByCid" parameterType="java.lang.String">
-    delete from customer_organization_info 
-    where cid = #{cid,jdbcType=VARCHAR}
-  </delete>
-  
-  
-  <update id="updateCustomerOrganizationByPrimaryKey" parameterType="com.goafanti.common.model.CustomerOrganizationInfo">
+  <select id="countByExample" parameterType="com.goafanti.common.model.CustomerOrganizationInfoExample" 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 20:04:10 CST 2017.
+    -->
+    select count(*) from customer_organization_info
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    update customer_organization_info
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.cid != null">
+        cid = #{record.cid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.companyName != null">
+        company_name = #{record.companyName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.locationProvince != null">
+        location_province = #{record.locationProvince,jdbcType=CHAR},
+      </if>
+      <if test="record.locationCity != null">
+        location_city = #{record.locationCity,jdbcType=VARCHAR},
+      </if>
+      <if test="record.locationArea != null">
+        location_area = #{record.locationArea,jdbcType=VARCHAR},
+      </if>
+      <if test="record.adress != null">
+        adress = #{record.adress,jdbcType=VARCHAR},
+      </if>
+      <if test="record.companyIndustry != null">
+        company_industry = #{record.companyIndustry,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    update customer_organization_info
+    set id = #{record.id,jdbcType=VARCHAR},
+      cid = #{record.cid,jdbcType=VARCHAR},
+      company_name = #{record.companyName,jdbcType=VARCHAR},
+      location_province = #{record.locationProvince,jdbcType=CHAR},
+      location_city = #{record.locationCity,jdbcType=VARCHAR},
+      location_area = #{record.locationArea,jdbcType=VARCHAR},
+      adress = #{record.adress,jdbcType=VARCHAR},
+      company_industry = #{record.companyIndustry,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.CustomerOrganizationInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
     update customer_organization_info
     <set>
       <if test="cid != null">
@@ -84,7 +297,13 @@
         company_name = #{companyName,jdbcType=VARCHAR},
       </if>
       <if test="locationProvince != null">
-        location_province = #{locationProvince,jdbcType=INTEGER},
+        location_province = #{locationProvince,jdbcType=CHAR},
+      </if>
+      <if test="locationCity != null">
+        location_city = #{locationCity,jdbcType=VARCHAR},
+      </if>
+      <if test="locationArea != null">
+        location_area = #{locationArea,jdbcType=VARCHAR},
       </if>
       <if test="adress != null">
         adress = #{adress,jdbcType=VARCHAR},
@@ -93,6 +312,22 @@
         company_industry = #{companyIndustry,jdbcType=VARCHAR},
       </if>
     </set>
-    where cid = #{cid,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.CustomerOrganizationInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    update customer_organization_info
+    set cid = #{cid,jdbcType=VARCHAR},
+      company_name = #{companyName,jdbcType=VARCHAR},
+      location_province = #{locationProvince,jdbcType=CHAR},
+      location_city = #{locationCity,jdbcType=VARCHAR},
+      location_area = #{locationArea,jdbcType=VARCHAR},
+      adress = #{adress,jdbcType=VARCHAR},
+      company_industry = #{companyIndustry,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
   </update>
 </mapper>

+ 274 - 21
src/main/java/com/goafanti/common/mapper/CustomerUserInfoMapper.xml

@@ -2,23 +2,172 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.CustomerUserInfoMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.CustomerUserInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="cid" jdbcType="VARCHAR" property="cid" />
     <result column="name" jdbcType="VARCHAR" property="name" />
     <result column="sex" jdbcType="CHAR" property="sex" />
     <result column="mobile" jdbcType="VARCHAR" property="mobile" />
-    <result column="tel_num" jdbcType="VARCHAR" property="telNum" />
     <result column="email" jdbcType="VARCHAR" property="email" />
     <result column="qq" jdbcType="VARCHAR" property="qq" />
     <result column="wechat" jdbcType="VARCHAR" property="wechat" />
     <result column="depatrment" jdbcType="VARCHAR" property="depatrment" />
     <result column="customer_position" jdbcType="VARCHAR" property="customerPosition" />
     <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+    <result column="tel_num" jdbcType="VARCHAR" property="telNum" />
   </resultMap>
-  
-  
-  <!-- 新增 -->
-  <insert id="insertCustomerUser" parameterType="com.goafanti.common.model.CustomerUserInfo">
+  <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 20:04:10 CST 2017.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_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 20:04:10 CST 2017.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    id, cid, name, sex, mobile, email, qq, wechat, depatrment, customer_position, remarks, 
+    tel_num
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.CustomerUserInfoExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from customer_user_info
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from customer_user_info
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    delete from customer_user_info
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.CustomerUserInfoExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    delete from customer_user_info
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.CustomerUserInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    insert into customer_user_info (id, cid, name, 
+      sex, mobile, email, qq, 
+      wechat, depatrment, customer_position, 
+      remarks, tel_num)
+    values (#{id,jdbcType=VARCHAR}, #{cid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
+      #{sex,jdbcType=CHAR}, #{mobile,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, 
+      #{wechat,jdbcType=VARCHAR}, #{depatrment,jdbcType=VARCHAR}, #{customerPosition,jdbcType=VARCHAR}, 
+      #{remarks,jdbcType=VARCHAR}, #{telNum,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.CustomerUserInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
     insert into customer_user_info
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -36,9 +185,6 @@
       <if test="mobile != null">
         mobile,
       </if>
-      <if test="telNum != null">
-        tel_num,
-      </if>
       <if test="email != null">
         email,
       </if>
@@ -57,6 +203,9 @@
       <if test="remarks != null">
         remarks,
       </if>
+      <if test="telNum != null">
+        tel_num,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -74,9 +223,6 @@
       <if test="mobile != null">
         #{mobile,jdbcType=VARCHAR},
       </if>
-      <if test="telNum != null">
-        #{telNum,jdbcType=VARCHAR},
-      </if>
       <if test="email != null">
         #{email,jdbcType=VARCHAR},
       </if>
@@ -95,15 +241,100 @@
       <if test="remarks != null">
         #{remarks,jdbcType=VARCHAR},
       </if>
+      <if test="telNum != null">
+        #{telNum,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
-  
-  <delete id="deleteCustomerUserByCid" parameterType="java.lang.String">
-    delete from customer_user_info 
-    where cid = #{cid,jdbcType=VARCHAR}
-  </delete>
-  
-  <update id="updateCustomerUserByPrimaryKey" parameterType="com.goafanti.common.model.CustomerUserInfo">
+  <select id="countByExample" parameterType="com.goafanti.common.model.CustomerUserInfoExample" 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 20:04:10 CST 2017.
+    -->
+    select count(*) from customer_user_info
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    update customer_user_info
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.cid != null">
+        cid = #{record.cid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.name != null">
+        name = #{record.name,jdbcType=VARCHAR},
+      </if>
+      <if test="record.sex != null">
+        sex = #{record.sex,jdbcType=CHAR},
+      </if>
+      <if test="record.mobile != null">
+        mobile = #{record.mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="record.email != null">
+        email = #{record.email,jdbcType=VARCHAR},
+      </if>
+      <if test="record.qq != null">
+        qq = #{record.qq,jdbcType=VARCHAR},
+      </if>
+      <if test="record.wechat != null">
+        wechat = #{record.wechat,jdbcType=VARCHAR},
+      </if>
+      <if test="record.depatrment != null">
+        depatrment = #{record.depatrment,jdbcType=VARCHAR},
+      </if>
+      <if test="record.customerPosition != null">
+        customer_position = #{record.customerPosition,jdbcType=VARCHAR},
+      </if>
+      <if test="record.remarks != null">
+        remarks = #{record.remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="record.telNum != null">
+        tel_num = #{record.telNum,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    update customer_user_info
+    set id = #{record.id,jdbcType=VARCHAR},
+      cid = #{record.cid,jdbcType=VARCHAR},
+      name = #{record.name,jdbcType=VARCHAR},
+      sex = #{record.sex,jdbcType=CHAR},
+      mobile = #{record.mobile,jdbcType=VARCHAR},
+      email = #{record.email,jdbcType=VARCHAR},
+      qq = #{record.qq,jdbcType=VARCHAR},
+      wechat = #{record.wechat,jdbcType=VARCHAR},
+      depatrment = #{record.depatrment,jdbcType=VARCHAR},
+      customer_position = #{record.customerPosition,jdbcType=VARCHAR},
+      remarks = #{record.remarks,jdbcType=VARCHAR},
+      tel_num = #{record.telNum,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.CustomerUserInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
     update customer_user_info
     <set>
       <if test="cid != null">
@@ -113,7 +344,7 @@
         name = #{name,jdbcType=VARCHAR},
       </if>
       <if test="sex != null">
-        sex = #{sex,jdbcType=INTEGER},
+        sex = #{sex,jdbcType=CHAR},
       </if>
       <if test="mobile != null">
         mobile = #{mobile,jdbcType=VARCHAR},
@@ -136,8 +367,30 @@
       <if test="remarks != null">
         remarks = #{remarks,jdbcType=VARCHAR},
       </if>
+      <if test="telNum != null">
+        tel_num = #{telNum,jdbcType=VARCHAR},
+      </if>
     </set>
-    where cid = #{cid,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
   </update>
-  
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.CustomerUserInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Oct 13 20:04:10 CST 2017.
+    -->
+    update customer_user_info
+    set cid = #{cid,jdbcType=VARCHAR},
+      name = #{name,jdbcType=VARCHAR},
+      sex = #{sex,jdbcType=CHAR},
+      mobile = #{mobile,jdbcType=VARCHAR},
+      email = #{email,jdbcType=VARCHAR},
+      qq = #{qq,jdbcType=VARCHAR},
+      wechat = #{wechat,jdbcType=VARCHAR},
+      depatrment = #{depatrment,jdbcType=VARCHAR},
+      customer_position = #{customerPosition,jdbcType=VARCHAR},
+      remarks = #{remarks,jdbcType=VARCHAR},
+      tel_num = #{telNum,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>  
 </mapper>

+ 151 - 80
src/main/java/com/goafanti/common/model/CustomerLog.java

@@ -1,62 +1,79 @@
 package com.goafanti.common.model;
 
+import java.util.Date;
+
 public class CustomerLog {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.id
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	private String id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.cid
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	private String cid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.operator_name
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	private String operatorName;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.operator_typ
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.operator_type
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
+	 */
+	private String operatorType;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.operator_time
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
+	 */
+	private Date operatorTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.before_customer_status
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
+	 */
+	private String beforeCustomerStatus;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.after_customer_status
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
-	private String operatorTyp;
+	private String afterCustomerStatus;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.operator_datetime
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.before_customer_intention
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
-	private String operatorDatetime;
+	private String beforeCustomerIntention;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.before_status
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.after_customer_intention
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
-	private String beforeStatus;
+	private String afterCustomerIntention;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.before_service
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.before_follow_situation
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
-	private String beforeService;
+	private String beforeFollowSituation;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.after_service
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.after_follow_situation
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
-	private String afterService;
+	private String afterFollowSituation;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.before_admin_name
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	private String beforeAdminName;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_log.after_admin_name
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	private String afterAdminName;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.id
 	 * @return  the value of customer_log.id
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public String getId() {
 		return id;
@@ -65,7 +82,7 @@ public class CustomerLog {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.id
 	 * @param id  the value for customer_log.id
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public void setId(String id) {
 		this.id = id;
@@ -74,7 +91,7 @@ public class CustomerLog {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.cid
 	 * @return  the value of customer_log.cid
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public String getCid() {
 		return cid;
@@ -83,7 +100,7 @@ public class CustomerLog {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.cid
 	 * @param cid  the value for customer_log.cid
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public void setCid(String cid) {
 		this.cid = cid;
@@ -92,7 +109,7 @@ public class CustomerLog {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.operator_name
 	 * @return  the value of customer_log.operator_name
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public String getOperatorName() {
 		return operatorName;
@@ -101,106 +118,160 @@ public class CustomerLog {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.operator_name
 	 * @param operatorName  the value for customer_log.operator_name
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public void setOperatorName(String operatorName) {
 		this.operatorName = operatorName;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.operator_typ
-	 * @return  the value of customer_log.operator_typ
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.operator_type
+	 * @return  the value of customer_log.operator_type
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
+	 */
+	public String getOperatorType() {
+		return operatorType;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.operator_type
+	 * @param operatorType  the value for customer_log.operator_type
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
+	 */
+	public void setOperatorType(String operatorType) {
+		this.operatorType = operatorType;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.operator_time
+	 * @return  the value of customer_log.operator_time
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
+	 */
+	public Date getOperatorTime() {
+		return operatorTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.operator_time
+	 * @param operatorTime  the value for customer_log.operator_time
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
+	 */
+	public void setOperatorTime(Date operatorTime) {
+		this.operatorTime = operatorTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.before_customer_status
+	 * @return  the value of customer_log.before_customer_status
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
+	 */
+	public String getBeforeCustomerStatus() {
+		return beforeCustomerStatus;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.before_customer_status
+	 * @param beforeCustomerStatus  the value for customer_log.before_customer_status
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
+	 */
+	public void setBeforeCustomerStatus(String beforeCustomerStatus) {
+		this.beforeCustomerStatus = beforeCustomerStatus;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.after_customer_status
+	 * @return  the value of customer_log.after_customer_status
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
-	public String getOperatorTyp() {
-		return operatorTyp;
+	public String getAfterCustomerStatus() {
+		return afterCustomerStatus;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.operator_typ
-	 * @param operatorTyp  the value for customer_log.operator_typ
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.after_customer_status
+	 * @param afterCustomerStatus  the value for customer_log.after_customer_status
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
-	public void setOperatorTyp(String operatorTyp) {
-		this.operatorTyp = operatorTyp;
+	public void setAfterCustomerStatus(String afterCustomerStatus) {
+		this.afterCustomerStatus = afterCustomerStatus;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.operator_datetime
-	 * @return  the value of customer_log.operator_datetime
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.before_customer_intention
+	 * @return  the value of customer_log.before_customer_intention
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
-	public String getOperatorDatetime() {
-		return operatorDatetime;
+	public String getBeforeCustomerIntention() {
+		return beforeCustomerIntention;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.operator_datetime
-	 * @param operatorDatetime  the value for customer_log.operator_datetime
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.before_customer_intention
+	 * @param beforeCustomerIntention  the value for customer_log.before_customer_intention
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
-	public void setOperatorDatetime(String operatorDatetime) {
-		this.operatorDatetime = operatorDatetime;
+	public void setBeforeCustomerIntention(String beforeCustomerIntention) {
+		this.beforeCustomerIntention = beforeCustomerIntention;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.before_status
-	 * @return  the value of customer_log.before_status
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.after_customer_intention
+	 * @return  the value of customer_log.after_customer_intention
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
-	public String getBeforeStatus() {
-		return beforeStatus;
+	public String getAfterCustomerIntention() {
+		return afterCustomerIntention;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.before_status
-	 * @param beforeStatus  the value for customer_log.before_status
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.after_customer_intention
+	 * @param afterCustomerIntention  the value for customer_log.after_customer_intention
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
-	public void setBeforeStatus(String beforeStatus) {
-		this.beforeStatus = beforeStatus;
+	public void setAfterCustomerIntention(String afterCustomerIntention) {
+		this.afterCustomerIntention = afterCustomerIntention;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.before_service
-	 * @return  the value of customer_log.before_service
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.before_follow_situation
+	 * @return  the value of customer_log.before_follow_situation
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
-	public String getBeforeService() {
-		return beforeService;
+	public String getBeforeFollowSituation() {
+		return beforeFollowSituation;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.before_service
-	 * @param beforeService  the value for customer_log.before_service
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.before_follow_situation
+	 * @param beforeFollowSituation  the value for customer_log.before_follow_situation
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
-	public void setBeforeService(String beforeService) {
-		this.beforeService = beforeService;
+	public void setBeforeFollowSituation(String beforeFollowSituation) {
+		this.beforeFollowSituation = beforeFollowSituation;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.after_service
-	 * @return  the value of customer_log.after_service
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.after_follow_situation
+	 * @return  the value of customer_log.after_follow_situation
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
-	public String getAfterService() {
-		return afterService;
+	public String getAfterFollowSituation() {
+		return afterFollowSituation;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.after_service
-	 * @param afterService  the value for customer_log.after_service
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.after_follow_situation
+	 * @param afterFollowSituation  the value for customer_log.after_follow_situation
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
-	public void setAfterService(String afterService) {
-		this.afterService = afterService;
+	public void setAfterFollowSituation(String afterFollowSituation) {
+		this.afterFollowSituation = afterFollowSituation;
 	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.before_admin_name
 	 * @return  the value of customer_log.before_admin_name
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public String getBeforeAdminName() {
 		return beforeAdminName;
@@ -209,7 +280,7 @@ public class CustomerLog {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.before_admin_name
 	 * @param beforeAdminName  the value for customer_log.before_admin_name
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public void setBeforeAdminName(String beforeAdminName) {
 		this.beforeAdminName = beforeAdminName;
@@ -218,7 +289,7 @@ public class CustomerLog {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_log.after_admin_name
 	 * @return  the value of customer_log.after_admin_name
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public String getAfterAdminName() {
 		return afterAdminName;
@@ -227,7 +298,7 @@ public class CustomerLog {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_log.after_admin_name
 	 * @param afterAdminName  the value for customer_log.after_admin_name
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public void setAfterAdminName(String afterAdminName) {
 		this.afterAdminName = afterAdminName;

+ 357 - 156
src/main/java/com/goafanti/common/model/CustomerLogExample.java

@@ -2,27 +2,28 @@ package com.goafanti.common.model;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Date;
 
 public class CustomerLogExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public CustomerLogExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -30,7 +31,7 @@ public class CustomerLogExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -38,7 +39,7 @@ public class CustomerLogExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -46,7 +47,7 @@ public class CustomerLogExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -54,7 +55,7 @@ public class CustomerLogExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -62,7 +63,7 @@ public class CustomerLogExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -70,7 +71,7 @@ public class CustomerLogExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -78,7 +79,7 @@ public class CustomerLogExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -88,7 +89,7 @@ public class CustomerLogExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -100,7 +101,7 @@ public class CustomerLogExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -109,7 +110,7 @@ public class CustomerLogExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -119,7 +120,7 @@ public class CustomerLogExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -372,353 +373,553 @@ public class CustomerLogExample {
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorTypIsNull() {
-			addCriterion("operator_typ is null");
+		public Criteria andOperatorTypeIsNull() {
+			addCriterion("operator_type is null");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorTypIsNotNull() {
-			addCriterion("operator_typ is not null");
+		public Criteria andOperatorTypeIsNotNull() {
+			addCriterion("operator_type is not null");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorTypEqualTo(String value) {
-			addCriterion("operator_typ =", value, "operatorTyp");
+		public Criteria andOperatorTypeEqualTo(String value) {
+			addCriterion("operator_type =", value, "operatorType");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorTypNotEqualTo(String value) {
-			addCriterion("operator_typ <>", value, "operatorTyp");
+		public Criteria andOperatorTypeNotEqualTo(String value) {
+			addCriterion("operator_type <>", value, "operatorType");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorTypGreaterThan(String value) {
-			addCriterion("operator_typ >", value, "operatorTyp");
+		public Criteria andOperatorTypeGreaterThan(String value) {
+			addCriterion("operator_type >", value, "operatorType");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorTypGreaterThanOrEqualTo(String value) {
-			addCriterion("operator_typ >=", value, "operatorTyp");
+		public Criteria andOperatorTypeGreaterThanOrEqualTo(String value) {
+			addCriterion("operator_type >=", value, "operatorType");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorTypLessThan(String value) {
-			addCriterion("operator_typ <", value, "operatorTyp");
+		public Criteria andOperatorTypeLessThan(String value) {
+			addCriterion("operator_type <", value, "operatorType");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorTypLessThanOrEqualTo(String value) {
-			addCriterion("operator_typ <=", value, "operatorTyp");
+		public Criteria andOperatorTypeLessThanOrEqualTo(String value) {
+			addCriterion("operator_type <=", value, "operatorType");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorTypLike(String value) {
-			addCriterion("operator_typ like", value, "operatorTyp");
+		public Criteria andOperatorTypeLike(String value) {
+			addCriterion("operator_type like", value, "operatorType");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorTypNotLike(String value) {
-			addCriterion("operator_typ not like", value, "operatorTyp");
+		public Criteria andOperatorTypeNotLike(String value) {
+			addCriterion("operator_type not like", value, "operatorType");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorTypIn(List<String> values) {
-			addCriterion("operator_typ in", values, "operatorTyp");
+		public Criteria andOperatorTypeIn(List<String> values) {
+			addCriterion("operator_type in", values, "operatorType");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorTypNotIn(List<String> values) {
-			addCriterion("operator_typ not in", values, "operatorTyp");
+		public Criteria andOperatorTypeNotIn(List<String> values) {
+			addCriterion("operator_type not in", values, "operatorType");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorTypBetween(String value1, String value2) {
-			addCriterion("operator_typ between", value1, value2, "operatorTyp");
+		public Criteria andOperatorTypeBetween(String value1, String value2) {
+			addCriterion("operator_type between", value1, value2, "operatorType");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorTypNotBetween(String value1, String value2) {
-			addCriterion("operator_typ not between", value1, value2, "operatorTyp");
+		public Criteria andOperatorTypeNotBetween(String value1, String value2) {
+			addCriterion("operator_type not between", value1, value2, "operatorType");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorDatetimeIsNull() {
-			addCriterion("operator_datetime is null");
+		public Criteria andOperatorTimeIsNull() {
+			addCriterion("operator_time is null");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorDatetimeIsNotNull() {
-			addCriterion("operator_datetime is not null");
+		public Criteria andOperatorTimeIsNotNull() {
+			addCriterion("operator_time is not null");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorDatetimeEqualTo(String value) {
-			addCriterion("operator_datetime =", value, "operatorDatetime");
+		public Criteria andOperatorTimeEqualTo(Date value) {
+			addCriterion("operator_time =", value, "operatorTime");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorDatetimeNotEqualTo(String value) {
-			addCriterion("operator_datetime <>", value, "operatorDatetime");
+		public Criteria andOperatorTimeNotEqualTo(Date value) {
+			addCriterion("operator_time <>", value, "operatorTime");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorDatetimeGreaterThan(String value) {
-			addCriterion("operator_datetime >", value, "operatorDatetime");
+		public Criteria andOperatorTimeGreaterThan(Date value) {
+			addCriterion("operator_time >", value, "operatorTime");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorDatetimeGreaterThanOrEqualTo(String value) {
-			addCriterion("operator_datetime >=", value, "operatorDatetime");
+		public Criteria andOperatorTimeGreaterThanOrEqualTo(Date value) {
+			addCriterion("operator_time >=", value, "operatorTime");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorDatetimeLessThan(String value) {
-			addCriterion("operator_datetime <", value, "operatorDatetime");
+		public Criteria andOperatorTimeLessThan(Date value) {
+			addCriterion("operator_time <", value, "operatorTime");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorDatetimeLessThanOrEqualTo(String value) {
-			addCriterion("operator_datetime <=", value, "operatorDatetime");
+		public Criteria andOperatorTimeLessThanOrEqualTo(Date value) {
+			addCriterion("operator_time <=", value, "operatorTime");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorDatetimeLike(String value) {
-			addCriterion("operator_datetime like", value, "operatorDatetime");
+		public Criteria andOperatorTimeIn(List<Date> values) {
+			addCriterion("operator_time in", values, "operatorTime");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorDatetimeNotLike(String value) {
-			addCriterion("operator_datetime not like", value, "operatorDatetime");
+		public Criteria andOperatorTimeNotIn(List<Date> values) {
+			addCriterion("operator_time not in", values, "operatorTime");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorDatetimeIn(List<String> values) {
-			addCriterion("operator_datetime in", values, "operatorDatetime");
+		public Criteria andOperatorTimeBetween(Date value1, Date value2) {
+			addCriterion("operator_time between", value1, value2, "operatorTime");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorDatetimeNotIn(List<String> values) {
-			addCriterion("operator_datetime not in", values, "operatorDatetime");
+		public Criteria andOperatorTimeNotBetween(Date value1, Date value2) {
+			addCriterion("operator_time not between", value1, value2, "operatorTime");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorDatetimeBetween(String value1, String value2) {
-			addCriterion("operator_datetime between", value1, value2, "operatorDatetime");
+		public Criteria andBeforeCustomerStatusIsNull() {
+			addCriterion("before_customer_status is null");
 			return (Criteria) this;
 		}
 
-		public Criteria andOperatorDatetimeNotBetween(String value1, String value2) {
-			addCriterion("operator_datetime not between", value1, value2, "operatorDatetime");
+		public Criteria andBeforeCustomerStatusIsNotNull() {
+			addCriterion("before_customer_status is not null");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeStatusIsNull() {
-			addCriterion("before_status is null");
+		public Criteria andBeforeCustomerStatusEqualTo(String value) {
+			addCriterion("before_customer_status =", value, "beforeCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeStatusIsNotNull() {
-			addCriterion("before_status is not null");
+		public Criteria andBeforeCustomerStatusNotEqualTo(String value) {
+			addCriterion("before_customer_status <>", value, "beforeCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeStatusEqualTo(String value) {
-			addCriterion("before_status =", value, "beforeStatus");
+		public Criteria andBeforeCustomerStatusGreaterThan(String value) {
+			addCriterion("before_customer_status >", value, "beforeCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeStatusNotEqualTo(String value) {
-			addCriterion("before_status <>", value, "beforeStatus");
+		public Criteria andBeforeCustomerStatusGreaterThanOrEqualTo(String value) {
+			addCriterion("before_customer_status >=", value, "beforeCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeStatusGreaterThan(String value) {
-			addCriterion("before_status >", value, "beforeStatus");
+		public Criteria andBeforeCustomerStatusLessThan(String value) {
+			addCriterion("before_customer_status <", value, "beforeCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeStatusGreaterThanOrEqualTo(String value) {
-			addCriterion("before_status >=", value, "beforeStatus");
+		public Criteria andBeforeCustomerStatusLessThanOrEqualTo(String value) {
+			addCriterion("before_customer_status <=", value, "beforeCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeStatusLessThan(String value) {
-			addCriterion("before_status <", value, "beforeStatus");
+		public Criteria andBeforeCustomerStatusLike(String value) {
+			addCriterion("before_customer_status like", value, "beforeCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeStatusLessThanOrEqualTo(String value) {
-			addCriterion("before_status <=", value, "beforeStatus");
+		public Criteria andBeforeCustomerStatusNotLike(String value) {
+			addCriterion("before_customer_status not like", value, "beforeCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeStatusLike(String value) {
-			addCriterion("before_status like", value, "beforeStatus");
+		public Criteria andBeforeCustomerStatusIn(List<String> values) {
+			addCriterion("before_customer_status in", values, "beforeCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeStatusNotLike(String value) {
-			addCriterion("before_status not like", value, "beforeStatus");
+		public Criteria andBeforeCustomerStatusNotIn(List<String> values) {
+			addCriterion("before_customer_status not in", values, "beforeCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeStatusIn(List<String> values) {
-			addCriterion("before_status in", values, "beforeStatus");
+		public Criteria andBeforeCustomerStatusBetween(String value1, String value2) {
+			addCriterion("before_customer_status between", value1, value2, "beforeCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeStatusNotIn(List<String> values) {
-			addCriterion("before_status not in", values, "beforeStatus");
+		public Criteria andBeforeCustomerStatusNotBetween(String value1, String value2) {
+			addCriterion("before_customer_status not between", value1, value2, "beforeCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeStatusBetween(String value1, String value2) {
-			addCriterion("before_status between", value1, value2, "beforeStatus");
+		public Criteria andAfterCustomerStatusIsNull() {
+			addCriterion("after_customer_status is null");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeStatusNotBetween(String value1, String value2) {
-			addCriterion("before_status not between", value1, value2, "beforeStatus");
+		public Criteria andAfterCustomerStatusIsNotNull() {
+			addCriterion("after_customer_status is not null");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeServiceIsNull() {
-			addCriterion("before_service is null");
+		public Criteria andAfterCustomerStatusEqualTo(String value) {
+			addCriterion("after_customer_status =", value, "afterCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeServiceIsNotNull() {
-			addCriterion("before_service is not null");
+		public Criteria andAfterCustomerStatusNotEqualTo(String value) {
+			addCriterion("after_customer_status <>", value, "afterCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeServiceEqualTo(String value) {
-			addCriterion("before_service =", value, "beforeService");
+		public Criteria andAfterCustomerStatusGreaterThan(String value) {
+			addCriterion("after_customer_status >", value, "afterCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeServiceNotEqualTo(String value) {
-			addCriterion("before_service <>", value, "beforeService");
+		public Criteria andAfterCustomerStatusGreaterThanOrEqualTo(String value) {
+			addCriterion("after_customer_status >=", value, "afterCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeServiceGreaterThan(String value) {
-			addCriterion("before_service >", value, "beforeService");
+		public Criteria andAfterCustomerStatusLessThan(String value) {
+			addCriterion("after_customer_status <", value, "afterCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeServiceGreaterThanOrEqualTo(String value) {
-			addCriterion("before_service >=", value, "beforeService");
+		public Criteria andAfterCustomerStatusLessThanOrEqualTo(String value) {
+			addCriterion("after_customer_status <=", value, "afterCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeServiceLessThan(String value) {
-			addCriterion("before_service <", value, "beforeService");
+		public Criteria andAfterCustomerStatusLike(String value) {
+			addCriterion("after_customer_status like", value, "afterCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeServiceLessThanOrEqualTo(String value) {
-			addCriterion("before_service <=", value, "beforeService");
+		public Criteria andAfterCustomerStatusNotLike(String value) {
+			addCriterion("after_customer_status not like", value, "afterCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeServiceLike(String value) {
-			addCriterion("before_service like", value, "beforeService");
+		public Criteria andAfterCustomerStatusIn(List<String> values) {
+			addCriterion("after_customer_status in", values, "afterCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeServiceNotLike(String value) {
-			addCriterion("before_service not like", value, "beforeService");
+		public Criteria andAfterCustomerStatusNotIn(List<String> values) {
+			addCriterion("after_customer_status not in", values, "afterCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeServiceIn(List<String> values) {
-			addCriterion("before_service in", values, "beforeService");
+		public Criteria andAfterCustomerStatusBetween(String value1, String value2) {
+			addCriterion("after_customer_status between", value1, value2, "afterCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeServiceNotIn(List<String> values) {
-			addCriterion("before_service not in", values, "beforeService");
+		public Criteria andAfterCustomerStatusNotBetween(String value1, String value2) {
+			addCriterion("after_customer_status not between", value1, value2, "afterCustomerStatus");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeServiceBetween(String value1, String value2) {
-			addCriterion("before_service between", value1, value2, "beforeService");
+		public Criteria andBeforeCustomerIntentionIsNull() {
+			addCriterion("before_customer_intention is null");
 			return (Criteria) this;
 		}
 
-		public Criteria andBeforeServiceNotBetween(String value1, String value2) {
-			addCriterion("before_service not between", value1, value2, "beforeService");
+		public Criteria andBeforeCustomerIntentionIsNotNull() {
+			addCriterion("before_customer_intention is not null");
 			return (Criteria) this;
 		}
 
-		public Criteria andAfterServiceIsNull() {
-			addCriterion("after_service is null");
+		public Criteria andBeforeCustomerIntentionEqualTo(String value) {
+			addCriterion("before_customer_intention =", value, "beforeCustomerIntention");
 			return (Criteria) this;
 		}
 
-		public Criteria andAfterServiceIsNotNull() {
-			addCriterion("after_service is not null");
+		public Criteria andBeforeCustomerIntentionNotEqualTo(String value) {
+			addCriterion("before_customer_intention <>", value, "beforeCustomerIntention");
 			return (Criteria) this;
 		}
 
-		public Criteria andAfterServiceEqualTo(String value) {
-			addCriterion("after_service =", value, "afterService");
+		public Criteria andBeforeCustomerIntentionGreaterThan(String value) {
+			addCriterion("before_customer_intention >", value, "beforeCustomerIntention");
 			return (Criteria) this;
 		}
 
-		public Criteria andAfterServiceNotEqualTo(String value) {
-			addCriterion("after_service <>", value, "afterService");
+		public Criteria andBeforeCustomerIntentionGreaterThanOrEqualTo(String value) {
+			addCriterion("before_customer_intention >=", value, "beforeCustomerIntention");
 			return (Criteria) this;
 		}
 
-		public Criteria andAfterServiceGreaterThan(String value) {
-			addCriterion("after_service >", value, "afterService");
+		public Criteria andBeforeCustomerIntentionLessThan(String value) {
+			addCriterion("before_customer_intention <", value, "beforeCustomerIntention");
 			return (Criteria) this;
 		}
 
-		public Criteria andAfterServiceGreaterThanOrEqualTo(String value) {
-			addCriterion("after_service >=", value, "afterService");
+		public Criteria andBeforeCustomerIntentionLessThanOrEqualTo(String value) {
+			addCriterion("before_customer_intention <=", value, "beforeCustomerIntention");
 			return (Criteria) this;
 		}
 
-		public Criteria andAfterServiceLessThan(String value) {
-			addCriterion("after_service <", value, "afterService");
+		public Criteria andBeforeCustomerIntentionLike(String value) {
+			addCriterion("before_customer_intention like", value, "beforeCustomerIntention");
 			return (Criteria) this;
 		}
 
-		public Criteria andAfterServiceLessThanOrEqualTo(String value) {
-			addCriterion("after_service <=", value, "afterService");
+		public Criteria andBeforeCustomerIntentionNotLike(String value) {
+			addCriterion("before_customer_intention not like", value, "beforeCustomerIntention");
 			return (Criteria) this;
 		}
 
-		public Criteria andAfterServiceLike(String value) {
-			addCriterion("after_service like", value, "afterService");
+		public Criteria andBeforeCustomerIntentionIn(List<String> values) {
+			addCriterion("before_customer_intention in", values, "beforeCustomerIntention");
 			return (Criteria) this;
 		}
 
-		public Criteria andAfterServiceNotLike(String value) {
-			addCriterion("after_service not like", value, "afterService");
+		public Criteria andBeforeCustomerIntentionNotIn(List<String> values) {
+			addCriterion("before_customer_intention not in", values, "beforeCustomerIntention");
 			return (Criteria) this;
 		}
 
-		public Criteria andAfterServiceIn(List<String> values) {
-			addCriterion("after_service in", values, "afterService");
+		public Criteria andBeforeCustomerIntentionBetween(String value1, String value2) {
+			addCriterion("before_customer_intention between", value1, value2, "beforeCustomerIntention");
 			return (Criteria) this;
 		}
 
-		public Criteria andAfterServiceNotIn(List<String> values) {
-			addCriterion("after_service not in", values, "afterService");
+		public Criteria andBeforeCustomerIntentionNotBetween(String value1, String value2) {
+			addCriterion("before_customer_intention not between", value1, value2, "beforeCustomerIntention");
 			return (Criteria) this;
 		}
 
-		public Criteria andAfterServiceBetween(String value1, String value2) {
-			addCriterion("after_service between", value1, value2, "afterService");
+		public Criteria andAfterCustomerIntentionIsNull() {
+			addCriterion("after_customer_intention is null");
 			return (Criteria) this;
 		}
 
-		public Criteria andAfterServiceNotBetween(String value1, String value2) {
-			addCriterion("after_service not between", value1, value2, "afterService");
+		public Criteria andAfterCustomerIntentionIsNotNull() {
+			addCriterion("after_customer_intention is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterCustomerIntentionEqualTo(String value) {
+			addCriterion("after_customer_intention =", value, "afterCustomerIntention");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterCustomerIntentionNotEqualTo(String value) {
+			addCriterion("after_customer_intention <>", value, "afterCustomerIntention");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterCustomerIntentionGreaterThan(String value) {
+			addCriterion("after_customer_intention >", value, "afterCustomerIntention");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterCustomerIntentionGreaterThanOrEqualTo(String value) {
+			addCriterion("after_customer_intention >=", value, "afterCustomerIntention");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterCustomerIntentionLessThan(String value) {
+			addCriterion("after_customer_intention <", value, "afterCustomerIntention");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterCustomerIntentionLessThanOrEqualTo(String value) {
+			addCriterion("after_customer_intention <=", value, "afterCustomerIntention");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterCustomerIntentionLike(String value) {
+			addCriterion("after_customer_intention like", value, "afterCustomerIntention");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterCustomerIntentionNotLike(String value) {
+			addCriterion("after_customer_intention not like", value, "afterCustomerIntention");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterCustomerIntentionIn(List<String> values) {
+			addCriterion("after_customer_intention in", values, "afterCustomerIntention");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterCustomerIntentionNotIn(List<String> values) {
+			addCriterion("after_customer_intention not in", values, "afterCustomerIntention");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterCustomerIntentionBetween(String value1, String value2) {
+			addCriterion("after_customer_intention between", value1, value2, "afterCustomerIntention");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterCustomerIntentionNotBetween(String value1, String value2) {
+			addCriterion("after_customer_intention not between", value1, value2, "afterCustomerIntention");
+			return (Criteria) this;
+		}
+
+		public Criteria andBeforeFollowSituationIsNull() {
+			addCriterion("before_follow_situation is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andBeforeFollowSituationIsNotNull() {
+			addCriterion("before_follow_situation is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andBeforeFollowSituationEqualTo(String value) {
+			addCriterion("before_follow_situation =", value, "beforeFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andBeforeFollowSituationNotEqualTo(String value) {
+			addCriterion("before_follow_situation <>", value, "beforeFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andBeforeFollowSituationGreaterThan(String value) {
+			addCriterion("before_follow_situation >", value, "beforeFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andBeforeFollowSituationGreaterThanOrEqualTo(String value) {
+			addCriterion("before_follow_situation >=", value, "beforeFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andBeforeFollowSituationLessThan(String value) {
+			addCriterion("before_follow_situation <", value, "beforeFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andBeforeFollowSituationLessThanOrEqualTo(String value) {
+			addCriterion("before_follow_situation <=", value, "beforeFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andBeforeFollowSituationLike(String value) {
+			addCriterion("before_follow_situation like", value, "beforeFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andBeforeFollowSituationNotLike(String value) {
+			addCriterion("before_follow_situation not like", value, "beforeFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andBeforeFollowSituationIn(List<String> values) {
+			addCriterion("before_follow_situation in", values, "beforeFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andBeforeFollowSituationNotIn(List<String> values) {
+			addCriterion("before_follow_situation not in", values, "beforeFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andBeforeFollowSituationBetween(String value1, String value2) {
+			addCriterion("before_follow_situation between", value1, value2, "beforeFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andBeforeFollowSituationNotBetween(String value1, String value2) {
+			addCriterion("before_follow_situation not between", value1, value2, "beforeFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterFollowSituationIsNull() {
+			addCriterion("after_follow_situation is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterFollowSituationIsNotNull() {
+			addCriterion("after_follow_situation is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterFollowSituationEqualTo(String value) {
+			addCriterion("after_follow_situation =", value, "afterFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterFollowSituationNotEqualTo(String value) {
+			addCriterion("after_follow_situation <>", value, "afterFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterFollowSituationGreaterThan(String value) {
+			addCriterion("after_follow_situation >", value, "afterFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterFollowSituationGreaterThanOrEqualTo(String value) {
+			addCriterion("after_follow_situation >=", value, "afterFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterFollowSituationLessThan(String value) {
+			addCriterion("after_follow_situation <", value, "afterFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterFollowSituationLessThanOrEqualTo(String value) {
+			addCriterion("after_follow_situation <=", value, "afterFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterFollowSituationLike(String value) {
+			addCriterion("after_follow_situation like", value, "afterFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterFollowSituationNotLike(String value) {
+			addCriterion("after_follow_situation not like", value, "afterFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterFollowSituationIn(List<String> values) {
+			addCriterion("after_follow_situation in", values, "afterFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterFollowSituationNotIn(List<String> values) {
+			addCriterion("after_follow_situation not in", values, "afterFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterFollowSituationBetween(String value1, String value2) {
+			addCriterion("after_follow_situation between", value1, value2, "afterFollowSituation");
+			return (Criteria) this;
+		}
+
+		public Criteria andAfterFollowSituationNotBetween(String value1, String value2) {
+			addCriterion("after_follow_situation not between", value1, value2, "afterFollowSituation");
 			return (Criteria) this;
 		}
 
@@ -865,7 +1066,7 @@ public class CustomerLogExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table customer_log
-	 * @mbg.generated  Tue Oct 10 10:28:39 CST 2017
+	 * @mbg.generated  Fri Oct 13 16:56:48 CST 2017
 	 */
 	public static class Criterion {
 		private String condition;

+ 51 - 33
src/main/java/com/goafanti/common/model/CustomerOrganizationInfo.java

@@ -3,42 +3,50 @@ package com.goafanti.common.model;
 public class CustomerOrganizationInfo {
 
 	/**
-	 * ID
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_organization_info.id
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String id;
 	/**
-	 * 客户记录id
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_organization_info.cid
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String cid;
 	/**
-	 *公司名称
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_organization_info.company_name
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String companyName;
 	/**
-	 * 归属省份
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_organization_info.location_province
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String locationProvince;
 	/**
-	 * 行业
-	 */
-	private String companyIndustry;
-	/**
-	 * 归属城市
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_organization_info.location_city
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String locationCity;
 	/**
-	 * 归属地区
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_organization_info.location_area
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String locationArea;
 	/**
-	 * 详细地址
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_organization_info.adress
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String adress;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_organization_info.company_industry
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	private String companyIndustry;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_organization_info.id
 	 * @return  the value of customer_organization_info.id
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getId() {
 		return id;
@@ -47,24 +55,16 @@ public class CustomerOrganizationInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_organization_info.id
 	 * @param id  the value for customer_organization_info.id
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setId(String id) {
 		this.id = id;
 	}
-	
-	public String getCompanyIndustry() {
-		return companyIndustry;
-	}
-
-	public void setCompanyIndustry(String companyIndustry) {
-		this.companyIndustry = companyIndustry;
-	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_organization_info.cid
 	 * @return  the value of customer_organization_info.cid
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getCid() {
 		return cid;
@@ -73,7 +73,7 @@ public class CustomerOrganizationInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_organization_info.cid
 	 * @param cid  the value for customer_organization_info.cid
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setCid(String cid) {
 		this.cid = cid;
@@ -82,7 +82,7 @@ public class CustomerOrganizationInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_organization_info.company_name
 	 * @return  the value of customer_organization_info.company_name
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getCompanyName() {
 		return companyName;
@@ -91,7 +91,7 @@ public class CustomerOrganizationInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_organization_info.company_name
 	 * @param companyName  the value for customer_organization_info.company_name
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setCompanyName(String companyName) {
 		this.companyName = companyName;
@@ -100,7 +100,7 @@ public class CustomerOrganizationInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_organization_info.location_province
 	 * @return  the value of customer_organization_info.location_province
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getLocationProvince() {
 		return locationProvince;
@@ -109,7 +109,7 @@ public class CustomerOrganizationInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_organization_info.location_province
 	 * @param locationProvince  the value for customer_organization_info.location_province
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setLocationProvince(String locationProvince) {
 		this.locationProvince = locationProvince;
@@ -118,7 +118,7 @@ public class CustomerOrganizationInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_organization_info.location_city
 	 * @return  the value of customer_organization_info.location_city
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getLocationCity() {
 		return locationCity;
@@ -127,7 +127,7 @@ public class CustomerOrganizationInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_organization_info.location_city
 	 * @param locationCity  the value for customer_organization_info.location_city
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setLocationCity(String locationCity) {
 		this.locationCity = locationCity;
@@ -136,7 +136,7 @@ public class CustomerOrganizationInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_organization_info.location_area
 	 * @return  the value of customer_organization_info.location_area
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getLocationArea() {
 		return locationArea;
@@ -145,7 +145,7 @@ public class CustomerOrganizationInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_organization_info.location_area
 	 * @param locationArea  the value for customer_organization_info.location_area
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setLocationArea(String locationArea) {
 		this.locationArea = locationArea;
@@ -154,7 +154,7 @@ public class CustomerOrganizationInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_organization_info.adress
 	 * @return  the value of customer_organization_info.adress
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getAdress() {
 		return adress;
@@ -163,9 +163,27 @@ public class CustomerOrganizationInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_organization_info.adress
 	 * @param adress  the value for customer_organization_info.adress
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setAdress(String adress) {
 		this.adress = adress;
 	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_organization_info.company_industry
+	 * @return  the value of customer_organization_info.company_industry
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	public String getCompanyIndustry() {
+		return companyIndustry;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_organization_info.company_industry
+	 * @param companyIndustry  the value for customer_organization_info.company_industry
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	public void setCompanyIndustry(String companyIndustry) {
+		this.companyIndustry = companyIndustry;
+	}
 }

+ 86 - 16
src/main/java/com/goafanti/common/model/CustomerOrganizationInfoExample.java

@@ -6,23 +6,23 @@ import java.util.List;
 public class CustomerOrganizationInfoExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table customer_organization_info
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table customer_organization_info
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table customer_organization_info
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public CustomerOrganizationInfoExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -30,7 +30,7 @@ public class CustomerOrganizationInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -38,7 +38,7 @@ public class CustomerOrganizationInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -46,7 +46,7 @@ public class CustomerOrganizationInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -54,7 +54,7 @@ public class CustomerOrganizationInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -62,7 +62,7 @@ public class CustomerOrganizationInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -70,7 +70,7 @@ public class CustomerOrganizationInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -78,7 +78,7 @@ public class CustomerOrganizationInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -88,7 +88,7 @@ public class CustomerOrganizationInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -100,7 +100,7 @@ public class CustomerOrganizationInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -109,7 +109,7 @@ public class CustomerOrganizationInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_organization_info
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -119,7 +119,7 @@ public class CustomerOrganizationInfoExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table customer_organization_info
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -651,11 +651,81 @@ public class CustomerOrganizationInfoExample {
 			addCriterion("adress not between", value1, value2, "adress");
 			return (Criteria) this;
 		}
+
+		public Criteria andCompanyIndustryIsNull() {
+			addCriterion("company_industry is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompanyIndustryIsNotNull() {
+			addCriterion("company_industry is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompanyIndustryEqualTo(String value) {
+			addCriterion("company_industry =", value, "companyIndustry");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompanyIndustryNotEqualTo(String value) {
+			addCriterion("company_industry <>", value, "companyIndustry");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompanyIndustryGreaterThan(String value) {
+			addCriterion("company_industry >", value, "companyIndustry");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompanyIndustryGreaterThanOrEqualTo(String value) {
+			addCriterion("company_industry >=", value, "companyIndustry");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompanyIndustryLessThan(String value) {
+			addCriterion("company_industry <", value, "companyIndustry");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompanyIndustryLessThanOrEqualTo(String value) {
+			addCriterion("company_industry <=", value, "companyIndustry");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompanyIndustryLike(String value) {
+			addCriterion("company_industry like", value, "companyIndustry");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompanyIndustryNotLike(String value) {
+			addCriterion("company_industry not like", value, "companyIndustry");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompanyIndustryIn(List<String> values) {
+			addCriterion("company_industry in", values, "companyIndustry");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompanyIndustryNotIn(List<String> values) {
+			addCriterion("company_industry not in", values, "companyIndustry");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompanyIndustryBetween(String value1, String value2) {
+			addCriterion("company_industry between", value1, value2, "companyIndustry");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompanyIndustryNotBetween(String value1, String value2) {
+			addCriterion("company_industry not between", value1, value2, "companyIndustry");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table customer_organization_info
-	 * @mbg.generated  Wed Oct 11 15:42:57 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public static class Criterion {
 		private String condition;

+ 68 - 45
src/main/java/com/goafanti/common/model/CustomerUserInfo.java

@@ -3,58 +3,70 @@ package com.goafanti.common.model;
 public class CustomerUserInfo {
 
 	/**
-	 * id
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_user_info.id
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String id;
 	/**
-	 * 客户记录id
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_user_info.cid
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String cid;
 	/**
-	 * 个人客户姓名
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_user_info.name
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String name;
 	/**
-	 * 性别(0-男,1-女)
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_user_info.sex
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String sex;
 	/**
-	 * 座机号码
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_user_info.mobile
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String mobile;
 	/**
-	 * 手机号
-	 */
-	private String telNum;
-	/**
-	 * 电子邮件
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_user_info.email
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String email;
 	/**
-	 * qq
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_user_info.qq
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String qq;
 	/**
-	 * 微信
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_user_info.wechat
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String wechat;
 	/**
-	 * 部门
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_user_info.depatrment
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String depatrment;
 	/**
-	 * 职位
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_user_info.customer_position
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String customerPosition;
 	/**
-	 * 备注
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_user_info.remarks
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	private String remarks;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column customer_user_info.tel_num
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	private String telNum;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_user_info.id
 	 * @return  the value of customer_user_info.id
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getId() {
 		return id;
@@ -63,7 +75,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_user_info.id
 	 * @param id  the value for customer_user_info.id
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setId(String id) {
 		this.id = id;
@@ -72,7 +84,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_user_info.cid
 	 * @return  the value of customer_user_info.cid
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getCid() {
 		return cid;
@@ -81,7 +93,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_user_info.cid
 	 * @param cid  the value for customer_user_info.cid
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setCid(String cid) {
 		this.cid = cid;
@@ -90,7 +102,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_user_info.name
 	 * @return  the value of customer_user_info.name
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getName() {
 		return name;
@@ -99,7 +111,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_user_info.name
 	 * @param name  the value for customer_user_info.name
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setName(String name) {
 		this.name = name;
@@ -108,7 +120,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_user_info.sex
 	 * @return  the value of customer_user_info.sex
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getSex() {
 		return sex;
@@ -117,7 +129,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_user_info.sex
 	 * @param sex  the value for customer_user_info.sex
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setSex(String sex) {
 		this.sex = sex;
@@ -126,7 +138,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_user_info.mobile
 	 * @return  the value of customer_user_info.mobile
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getMobile() {
 		return mobile;
@@ -135,24 +147,16 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_user_info.mobile
 	 * @param mobile  the value for customer_user_info.mobile
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setMobile(String mobile) {
 		this.mobile = mobile;
 	}
-	
-	public String getTelNum() {
-		return telNum;
-	}
-
-	public void setTelNum(String telNum) {
-		this.telNum = telNum;
-	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_user_info.email
 	 * @return  the value of customer_user_info.email
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getEmail() {
 		return email;
@@ -161,7 +165,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_user_info.email
 	 * @param email  the value for customer_user_info.email
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setEmail(String email) {
 		this.email = email;
@@ -170,7 +174,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_user_info.qq
 	 * @return  the value of customer_user_info.qq
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getQq() {
 		return qq;
@@ -179,7 +183,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_user_info.qq
 	 * @param qq  the value for customer_user_info.qq
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setQq(String qq) {
 		this.qq = qq;
@@ -188,7 +192,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_user_info.wechat
 	 * @return  the value of customer_user_info.wechat
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getWechat() {
 		return wechat;
@@ -197,7 +201,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_user_info.wechat
 	 * @param wechat  the value for customer_user_info.wechat
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setWechat(String wechat) {
 		this.wechat = wechat;
@@ -206,7 +210,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_user_info.depatrment
 	 * @return  the value of customer_user_info.depatrment
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getDepatrment() {
 		return depatrment;
@@ -215,7 +219,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_user_info.depatrment
 	 * @param depatrment  the value for customer_user_info.depatrment
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setDepatrment(String depatrment) {
 		this.depatrment = depatrment;
@@ -224,7 +228,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_user_info.customer_position
 	 * @return  the value of customer_user_info.customer_position
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getCustomerPosition() {
 		return customerPosition;
@@ -233,7 +237,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_user_info.customer_position
 	 * @param customerPosition  the value for customer_user_info.customer_position
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setCustomerPosition(String customerPosition) {
 		this.customerPosition = customerPosition;
@@ -242,7 +246,7 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_user_info.remarks
 	 * @return  the value of customer_user_info.remarks
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getRemarks() {
 		return remarks;
@@ -251,9 +255,28 @@ public class CustomerUserInfo {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_user_info.remarks
 	 * @param remarks  the value for customer_user_info.remarks
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setRemarks(String remarks) {
 		this.remarks = remarks;
 	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer_user_info.tel_num
+	 * @return  the value of customer_user_info.tel_num
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	public String getTelNum() {
+		return telNum;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer_user_info.tel_num
+	 * @param telNum  the value for customer_user_info.tel_num
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
+	 */
+	public void setTelNum(String telNum) {
+		this.telNum = telNum;
+	}
+
 }

+ 86 - 16
src/main/java/com/goafanti/common/model/CustomerUserInfoExample.java

@@ -6,23 +6,23 @@ import java.util.List;
 public class CustomerUserInfoExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table customer_user_info
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table customer_user_info
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table customer_user_info
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public CustomerUserInfoExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -30,7 +30,7 @@ public class CustomerUserInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -38,7 +38,7 @@ public class CustomerUserInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -46,7 +46,7 @@ public class CustomerUserInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -54,7 +54,7 @@ public class CustomerUserInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -62,7 +62,7 @@ public class CustomerUserInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -70,7 +70,7 @@ public class CustomerUserInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -78,7 +78,7 @@ public class CustomerUserInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -88,7 +88,7 @@ public class CustomerUserInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -100,7 +100,7 @@ public class CustomerUserInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -109,7 +109,7 @@ public class CustomerUserInfoExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer_user_info
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -119,7 +119,7 @@ public class CustomerUserInfoExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table customer_user_info
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -931,11 +931,81 @@ public class CustomerUserInfoExample {
 			addCriterion("remarks not between", value1, value2, "remarks");
 			return (Criteria) this;
 		}
+
+		public Criteria andTelNumIsNull() {
+			addCriterion("tel_num is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTelNumIsNotNull() {
+			addCriterion("tel_num is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTelNumEqualTo(String value) {
+			addCriterion("tel_num =", value, "telNum");
+			return (Criteria) this;
+		}
+
+		public Criteria andTelNumNotEqualTo(String value) {
+			addCriterion("tel_num <>", value, "telNum");
+			return (Criteria) this;
+		}
+
+		public Criteria andTelNumGreaterThan(String value) {
+			addCriterion("tel_num >", value, "telNum");
+			return (Criteria) this;
+		}
+
+		public Criteria andTelNumGreaterThanOrEqualTo(String value) {
+			addCriterion("tel_num >=", value, "telNum");
+			return (Criteria) this;
+		}
+
+		public Criteria andTelNumLessThan(String value) {
+			addCriterion("tel_num <", value, "telNum");
+			return (Criteria) this;
+		}
+
+		public Criteria andTelNumLessThanOrEqualTo(String value) {
+			addCriterion("tel_num <=", value, "telNum");
+			return (Criteria) this;
+		}
+
+		public Criteria andTelNumLike(String value) {
+			addCriterion("tel_num like", value, "telNum");
+			return (Criteria) this;
+		}
+
+		public Criteria andTelNumNotLike(String value) {
+			addCriterion("tel_num not like", value, "telNum");
+			return (Criteria) this;
+		}
+
+		public Criteria andTelNumIn(List<String> values) {
+			addCriterion("tel_num in", values, "telNum");
+			return (Criteria) this;
+		}
+
+		public Criteria andTelNumNotIn(List<String> values) {
+			addCriterion("tel_num not in", values, "telNum");
+			return (Criteria) this;
+		}
+
+		public Criteria andTelNumBetween(String value1, String value2) {
+			addCriterion("tel_num between", value1, value2, "telNum");
+			return (Criteria) this;
+		}
+
+		public Criteria andTelNumNotBetween(String value1, String value2) {
+			addCriterion("tel_num not between", value1, value2, "telNum");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table customer_user_info
-	 * @mbg.generated  Wed Oct 11 15:42:45 CST 2017
+	 * @mbg.generated  Fri Oct 13 20:04:10 CST 2017
 	 */
 	public static class Criterion {
 		private String condition;

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

@@ -1,6 +1,8 @@
 package com.goafanti.customer.bo;
 
 public class CustomerIn {
+	/** 客户编号 **/
+	private String id;
 	/** 客户名 **/
 	private String customerName;
 	
@@ -27,6 +29,17 @@ public class CustomerIn {
 	
 	/** 跟单人 **/
 	private String adminName;
+	
+	/** 跟单人ID **/
+	private String aid;
+	
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
 
 	public String getCustomerName() {
 		return customerName;
@@ -99,5 +112,13 @@ public class CustomerIn {
 	public void setAdminName(String adminName) {
 		this.adminName = adminName;
 	}
-	
+
+	public String getAid() {
+		return aid;
+	}
+
+	public void setAid(String aid) {
+		this.aid = aid;
+	}
+
 }

+ 19 - 6
src/main/java/com/goafanti/customer/bo/CustomerOut.java

@@ -11,6 +11,11 @@ public class CustomerOut {
 	 * id
 	 */
 	private String id;
+	
+	/**
+	 * 客户名
+	 */
+	private String customerName;
 	/**
 	 * cid
 	 */
@@ -45,9 +50,9 @@ public class CustomerOut {
 	
 	private String _customerStatus;
 	/**
-	 * 个人客户姓
+	 * 客户联系人
 	 */
-	private String name;
+	private String contactName;
 	/**
 	 * 性别(0-男,1-女)
 	 */
@@ -143,6 +148,14 @@ public class CustomerOut {
 		this.id = id;
 	}
 
+	public String getCustomerName() {
+		return customerName;
+	}
+
+	public void setCustomerName(String customerName) {
+		this.customerName = customerName;
+	}
+	
 	public String getCid() {
 		return cid;
 	}
@@ -223,12 +236,12 @@ public class CustomerOut {
 		this._customerStatus = _customerStatus;
 	}
 
-	public String getName() {
-		return name;
+	public String getContactName() {
+		return contactName;
 	}
 
-	public void setName(String name) {
-		this.name = name;
+	public void setContactName(String contactName) {
+		this.contactName = contactName;
 	}
 
 	public String getSex() {

+ 22 - 24
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -1,5 +1,6 @@
 package com.goafanti.customer.controller;
 
+import java.lang.reflect.InvocationTargetException;
 import java.text.ParseException;
 import java.util.List;
 import java.util.UUID;
@@ -7,6 +8,7 @@ import java.util.UUID;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 
+import org.apache.commons.beanutils.BeanUtils;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
@@ -18,13 +20,13 @@ import com.goafanti.customer.service.CustomerService;
 import com.goafanti.customer.service.CustomerUserService;
 import com.goafanti.admin.service.AdminService;
 import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.controller.BaseController;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.Customer;
 import com.goafanti.common.model.CustomerOrganizationInfo;
 import com.goafanti.common.model.CustomerUserInfo;
 import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.core.shiro.token.TokenManager;
 
 @RestController
 @RequestMapping(value = "/api/admin/customer")
@@ -44,27 +46,26 @@ public class AdminCustomerApiController extends BaseController {
 	 * 
 	 * @return
 	 * @throws ParseException
+	 * @throws InvocationTargetException 
+	 * @throws IllegalAccessException 
 	 */
 	@RequestMapping(value = "/addCustomer", method = RequestMethod.POST)
-	public Result addCustomer(Customer cus,CustomerOrganizationInfo coi,CustomerUserInfo cui) throws ParseException {
+	public Result addCustomer(CustomerIn cusIn,CustomerOrganizationInfo coi,CustomerUserInfo cui) throws ParseException, IllegalAccessException, InvocationTargetException {
 		Result res=new Result();
-		/*生成cutomerid*/
-		String cid = UUID.randomUUID().toString();
-		cus.setId(cid);
-		/*获取admin的id*/
-		cus.setAid(TokenManager.getUserId());
-		/*插入客户信息*/
-		int result = customerService.addCustomer(cus);
-		if(result>0) {
-			/*插入客户个人信息*/
-			cui.setCid(cid);
-			cui.setId(UUID.randomUUID().toString());
-			customerUserService.addCustomerUser(cui);
-			/*插入客户公司信息*/
-			coi.setCid(cid);
-			coi.setId(UUID.randomUUID().toString());
-			customerOrganizationService.addCustomerOrganization(coi);
-		}
+		//添加 customer
+		String customerId = UUID.randomUUID().toString();
+		Customer c = new Customer();
+		BeanUtils.copyProperties(c, cusIn);
+		c.setId(customerId);
+		customerService.addCustomer(c);
+		//插入 customerUserInfo
+		coi.setCid(customerId);
+		customerService.addCustomerOrganizationInfo(coi);
+		//插入 customerOrganizationInfo
+		cui.setCid(customerId);
+		customerService.addCustomerOrganizationInfo(coi);
+		//添加日志
+		customerService.saveCustomerLogo(cusIn, AFTConstants.CUSTOMER_CREATE);
 		return res;
 	}
 	
@@ -78,9 +79,7 @@ public class AdminCustomerApiController extends BaseController {
 	@RequestMapping(value = "/deleteCustomer", method = RequestMethod.POST)
 	public Result deleteCustomer(String id) throws ParseException {
 		Result res=new Result();
-		customerService.deleteCustomer(id);
-		customerUserService.deleteCustomerUserByCid(id);
-		customerOrganizationService.deleteCustomerOrganizationByCid(id);
+		//把 customer 的 effective 修改为 1 - 失效
 		return res;
 	}
 	
@@ -119,10 +118,9 @@ public class AdminCustomerApiController extends BaseController {
 	@RequestMapping(value = "/listPrivateCustomer", method = RequestMethod.POST)
 	public Result listPrivateCustomer(HttpServletRequest request,CustomerIn cin,Integer pageSize, Integer pageNumber){
 		Result  res = new Result();
-		String currentUserId = TokenManager.getUserId();
-		//权限
 		Pagination<CustomerOut> boList = customerService.getPrivateCustomer(cin, pageSize, pageNumber);
 		res.setData(boList);
 		return res;
 	}
+
 }

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

@@ -1,7 +1,8 @@
 package com.goafanti.customer.service;
 
 import com.goafanti.common.model.Customer;
-
+import com.goafanti.common.model.CustomerOrganizationInfo;
+import com.goafanti.common.model.CustomerUserInfo;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.customer.bo.CustomerIn;
 import com.goafanti.customer.bo.CustomerOut;
@@ -16,6 +17,19 @@ public interface CustomerService {
 	int addCustomer(Customer cus);
 	
 	/**
+	 * 添加客户联系人信息
+	 * @param cui
+	 * @return
+	 */
+	int addCustomerUserInfo(CustomerUserInfo cui);
+	
+	/**
+	 * 添加客户公司信息
+	 * @param coi
+	 * @return
+	 */
+	int addCustomerOrganizationInfo(CustomerOrganizationInfo coi);
+	/**
 	 * 删除客户信息
 	 * @param id
 	 */
@@ -45,5 +59,12 @@ public interface CustomerService {
 	 * @return
 	 */
 	Pagination<CustomerOut> getPublicCustomer(CustomerIn cin,Integer pageSize, Integer pageNumber);
+	
+	/**
+	 * 
+	 * @param cus 添加日志
+	 * @param operatorType
+	 */
+	public void saveCustomerLogo(CustomerIn cus,String operatorType);
 	
 }

+ 71 - 1
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -1,20 +1,33 @@
 package com.goafanti.customer.service.impl;
 
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.UUID;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.customer.bo.CustomerIn;
 import com.goafanti.customer.bo.CustomerOut;
 import com.goafanti.customer.service.CustomerService;
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.AdminMapper;
+import com.goafanti.common.dao.CustomerLogMapper;
 import com.goafanti.common.dao.CustomerMapper;
+import com.goafanti.common.dao.CustomerOrganizationInfoMapper;
+import com.goafanti.common.dao.CustomerUserInfoMapper;
+import com.goafanti.common.enums.CustomerFollowFiled;
+import com.goafanti.common.enums.CustomerIntentionFiled;
+import com.goafanti.common.enums.CustomerStatusFiled;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.Customer;
+import com.goafanti.common.model.CustomerLog;
+import com.goafanti.common.model.CustomerOrganizationInfo;
+import com.goafanti.common.model.CustomerUserInfo;
 import com.goafanti.common.utils.StringUtils;
 @Service
 public class CustomerServiceImpl extends BaseMybatisDao<CustomerMapper> implements CustomerService {
@@ -22,7 +35,12 @@ public class CustomerServiceImpl extends BaseMybatisDao<CustomerMapper> implemen
 	private CustomerMapper customerMapper ;
 	@Autowired
 	private AdminMapper adminMapper;
-	
+	@Autowired
+	private CustomerLogMapper CustomerLogMapper;
+	@Autowired
+	private CustomerOrganizationInfoMapper customerOrganizationInfoMapper;
+	@Autowired
+	private CustomerUserInfoMapper customerUserInfoMapper;
 	@Override
 	public int addCustomer(Customer cus) {
 		int res = customerMapper.insertCustomer(cus);
@@ -63,6 +81,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<CustomerMapper> implemen
 	@Override
 	public Pagination<CustomerOut> getPrivateCustomer(CustomerIn cin, Integer pageSize, Integer pageNumber) {
 		cin.setShareTyp("0");
+		cin.setAid(TokenManager.getUserId());
 		Map<String,Object> params = disposeParams(cin);
 		if(pageSize == null || pageSize < 0) pageSize = 10;
 		if(pageNumber == null || pageNumber <0 ) pageNumber = 1;
@@ -80,6 +99,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<CustomerMapper> implemen
 	private Map<String,Object> disposeParams(CustomerIn cin){
 		Map<String,Object> params = new HashMap<String,Object>();
 		if(StringUtils.isNotBlank(cin.getAdminName())) params.put("adminName", cin.getAdminName());
+		if(StringUtils.isNotBlank(cin.getAid())) params.put("adminId", cin.getAid());
 		if(StringUtils.isNotBlank(cin.getCompanyIntention())) params.put("companyIntention", Integer.parseInt(cin.getCompanyIntention()));
 		if(StringUtils.isNotBlank(cin.getContactName())) params.put("contactName", cin.getContactName());
 		if(StringUtils.isNotBlank(cin.getCustomerStatus())) params.put("customerStauts", Integer.parseInt(cin.getCustomerStatus()));
@@ -131,4 +151,54 @@ public class CustomerServiceImpl extends BaseMybatisDao<CustomerMapper> implemen
 		}
 		return list;
 	}
+	
+	/**
+	 * 获取客户意向
+	 * @param intentions
+	 * @return
+	 */
+	private String getCompanyIntention(String intentions){
+		String[] list = intentions.split(",");
+		String result = "";
+		if(list.length>0){
+			for(String s:list){
+				result += CustomerIntentionFiled.getField(Integer.parseInt(s)).getDesc()+",";
+			}
+		}
+		return result.substring(0, result.length()-1);
+	}
+	
+	@Override
+	public void saveCustomerLogo(CustomerIn cus,String operatorType){
+		/* 记录日志 */
+		CustomerLog log = new CustomerLog();
+		log.setId(UUID.randomUUID().toString());
+		log.setCid(cus.getId());
+		log.setOperatorTime(new Date());
+		log.setOperatorName(TokenManager.getAdminToken().getName());
+		log.setAfterFollowSituation(CustomerFollowFiled.getField(Integer.parseInt(cus.getFollowSituation())).getDesc()); //跟进状态
+		log.setAfterCustomerIntention(getCompanyIntention(cus.getCompanyIntention())); //跟进意向
+		log.setAfterCustomerStatus(CustomerStatusFiled.getField(Integer.parseInt(cus.getCustomerStatus())).getDesc()); //客户状态
+		if(operatorType.equals(AFTConstants.CUSTOMER_CREATE)){//创建用户
+			log.setAfterAdminName(adminMapper.selectByPrimaryKey(cus.getAid()).getName()); //接单人
+			log.setOperatorType(AFTConstants.CUSTOMER_CREATE);
+		}else if(operatorType.equals(AFTConstants.CUSTOMER_MODIFY)){ //修改用户
+			
+		}else if(operatorType.equals(AFTConstants.CUSTOMER_DELETE)){ //删除用户
+			
+		}else if(operatorType.equals(AFTConstants.CUSTOMER_TRANSFER)){ //转交客户
+			
+		}
+		CustomerLogMapper.insert(log);
+	}
+
+	@Override
+	public int addCustomerUserInfo(CustomerUserInfo cui) {
+		return customerUserInfoMapper.insert(cui);
+	}
+
+	@Override
+	public int addCustomerOrganizationInfo(CustomerOrganizationInfo coi) {
+		return customerOrganizationInfoMapper.insert(coi);
+	}
 }