zou_ht před 8 roky
rodič
revize
4fb67874f7

+ 1 - 1
generatorConfig.xml

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

+ 80 - 28
src/main/java/com/goafanti/common/dao/CustomerMapper.java

@@ -1,44 +1,96 @@
 package com.goafanti.common.dao;
 
-
+import com.goafanti.common.model.Customer;
+import com.goafanti.common.model.CustomerExample;
 import java.util.List;
-
 import org.apache.ibatis.annotations.Param;
 
-import com.goafanti.common.model.Customer;
-
 public interface CustomerMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    long countByExample(CustomerExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    int deleteByExample(CustomerExample example);
 
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    int deleteByPrimaryKey(String id);
 
-	/**
-	 * 删除客户信息
-	 */
-	int deleteCustomerByPrimaryKey(String id);
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    int insert(Customer record);
 
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    int insertSelective(Customer record);
 
-	/**
-	 * 查询客户详情
-	 */
-	Customer selectCustomerByPrimaryKey(String id);
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    List<Customer> selectByExample(CustomerExample example);
 
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    Customer selectByPrimaryKey(String id);
 
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    int updateByExampleSelective(@Param("record") Customer record, @Param("example") CustomerExample example);
 
-	/**
-	 * 修改客户信息
-	 */
-	int updateCustomerByPrimaryKey(String id);
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    int updateByExample(@Param("record") Customer record, @Param("example") CustomerExample example);
 
-	/**
-	 * 新增
-	 */
-	int insertCustomer(Customer cus);
-	
-	/**
-	 * 
-	 * @param ladderId 上层领导ID
-	 * @return 所有包含上层领导ID的 客户记录
-	 */
-	List<Customer> selectByLadderId(@Param("ladderId")String ladderId);
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    int updateByPrimaryKeySelective(Customer record);
 
-	void updateByPrimaryKeySelective(Customer customer);
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    int updateByPrimaryKey(Customer record);
 }

+ 182 - 30
src/main/java/com/goafanti/common/mapper/CustomerMapper.xml

@@ -2,6 +2,11 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.CustomerMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.Customer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 12 20:42:55 CST 2017.
+    -->
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="aid" jdbcType="VARCHAR" property="aid" />
     <result column="customer_typ" jdbcType="VARCHAR" property="customerTyp" />
@@ -12,12 +17,13 @@
     <result column="follow_situation" jdbcType="VARCHAR" property="followSituation" />
     <result column="customer_statue" jdbcType="VARCHAR" property="customerStatue" />
     <result column="paid" jdbcType="VARCHAR" property="paid" />
+    <result column="tag" jdbcType="VARCHAR" property="tag" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 11 15:40:31 CST 2017.
+      This element was generated on Thu Oct 12 20:42:55 CST 2017.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -47,39 +53,84 @@
       </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 Thu Oct 12 20:42:55 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 Wed Oct 11 15:40:31 CST 2017.
+      This element was generated on Thu Oct 12 20:42:55 CST 2017.
     -->
     id, aid, customer_typ, share_typ, agent_id, company_intention, create_time, follow_situation, 
-    customer_statue, paid
+    customer_statue, paid, tag
   </sql>
-   <select id="selectCustomerByPrimaryKey" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerBo">
+  <select id="selectByExample" parameterType="com.goafanti.common.model.CustomerExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 12 20:42:55 CST 2017.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from customer
+    <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 Thu Oct 12 20:42:55 CST 2017.
+    -->
     select 
-    a.customer_typ as customerTyp,
-     a.share_typ as shareTyp,
-    a.company_intention as companyIntention,
-    a.create_time as createTime,
-    a.follow_situation as followSituation,
-    a.customer_statue as customerStatue,
-    b.name,b.sex,b.mobile,b.tel_num as telNum,b.email,b.qq,b.wechat,b.depatrment,b.remarks,
-    b.customer_position as customerPosition,
-    c.company_name as companyName,
-    c.location_province as locationProvince,
-    c.company_industry as companyIndustry,
-    c.adress -->
-    from customer a 
-    left join customer_user_info b on  a.id=b.cid
-    left join customer_organization_info c on a.id=c.cid
+    <include refid="Base_Column_List" />
+    from customer
     where id = #{id,jdbcType=VARCHAR}
-  </select> 
-  <delete id="deleteCustomerByPrimaryKey" parameterType="java.lang.String">
+  </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 Wed Oct 11 15:40:31 CST 2017.
+      This element was generated on Thu Oct 12 20:42:55 CST 2017.
     -->
     delete from customer
     where id = #{id,jdbcType=VARCHAR}
@@ -88,7 +139,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 11 15:40:31 CST 2017.
+      This element was generated on Thu Oct 12 20:42:55 CST 2017.
     -->
     delete from customer
     <if test="_parameter != null">
@@ -99,22 +150,22 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 11 15:40:31 CST 2017.
+      This element was generated on Thu Oct 12 20:42:55 CST 2017.
     -->
     insert into customer (id, aid, customer_typ, 
       share_typ, agent_id, company_intention, 
       create_time, follow_situation, customer_statue, 
-      paid)
+      paid, tag)
     values (#{id,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{customerTyp,jdbcType=VARCHAR}, 
       #{shareTyp,jdbcType=INTEGER}, #{agentId,jdbcType=VARCHAR}, #{companyIntention,jdbcType=VARCHAR}, 
       #{createTime,jdbcType=TIMESTAMP}, #{followSituation,jdbcType=VARCHAR}, #{customerStatue,jdbcType=VARCHAR}, 
-      #{paid,jdbcType=VARCHAR})
+      #{paid,jdbcType=VARCHAR}, #{tag,jdbcType=VARCHAR})
   </insert>
-  <insert id="insertCustomer" parameterType="com.goafanti.common.model.Customer">
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.Customer">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 11 15:40:31 CST 2017.
+      This element was generated on Thu Oct 12 20:42:55 CST 2017.
     -->
     insert into customer
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -148,6 +199,9 @@
       <if test="paid != null">
         paid,
       </if>
+      <if test="tag != null">
+        tag,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -180,20 +234,96 @@
       <if test="paid != null">
         #{paid,jdbcType=VARCHAR},
       </if>
+      <if test="tag != null">
+        #{tag,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.CustomerExample" resultType="java.lang.Long">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 11 15:40:31 CST 2017.
+      This element was generated on Thu Oct 12 20:42:55 CST 2017.
     -->
     select count(*) from customer
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
     </if>
   </select>
-  <update id="updateCustomerByPrimaryKey" parameterType="com.goafanti.common.model.Customer">
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 12 20:42:55 CST 2017.
+    -->
+    update customer
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.aid != null">
+        aid = #{record.aid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.customerTyp != null">
+        customer_typ = #{record.customerTyp,jdbcType=VARCHAR},
+      </if>
+      <if test="record.shareTyp != null">
+        share_typ = #{record.shareTyp,jdbcType=INTEGER},
+      </if>
+      <if test="record.agentId != null">
+        agent_id = #{record.agentId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.companyIntention != null">
+        company_intention = #{record.companyIntention,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.followSituation != null">
+        follow_situation = #{record.followSituation,jdbcType=VARCHAR},
+      </if>
+      <if test="record.customerStatue != null">
+        customer_statue = #{record.customerStatue,jdbcType=VARCHAR},
+      </if>
+      <if test="record.paid != null">
+        paid = #{record.paid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.tag != null">
+        tag = #{record.tag,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 Thu Oct 12 20:42:55 CST 2017.
+    -->
+    update customer
+    set id = #{record.id,jdbcType=VARCHAR},
+      aid = #{record.aid,jdbcType=VARCHAR},
+      customer_typ = #{record.customerTyp,jdbcType=VARCHAR},
+      share_typ = #{record.shareTyp,jdbcType=INTEGER},
+      agent_id = #{record.agentId,jdbcType=VARCHAR},
+      company_intention = #{record.companyIntention,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      follow_situation = #{record.followSituation,jdbcType=VARCHAR},
+      customer_statue = #{record.customerStatue,jdbcType=VARCHAR},
+      paid = #{record.paid,jdbcType=VARCHAR},
+      tag = #{record.tag,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Customer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 12 20:42:55 CST 2017.
+    -->
     update customer
     <set>
       <if test="aid != null">
@@ -223,7 +353,29 @@
       <if test="paid != null">
         paid = #{paid,jdbcType=VARCHAR},
       </if>
+      <if test="tag != null">
+        tag = #{tag,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Customer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 12 20:42:55 CST 2017.
+    -->
+    update customer
+    set aid = #{aid,jdbcType=VARCHAR},
+      customer_typ = #{customerTyp,jdbcType=VARCHAR},
+      share_typ = #{shareTyp,jdbcType=INTEGER},
+      agent_id = #{agentId,jdbcType=VARCHAR},
+      company_intention = #{companyIntention,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      follow_situation = #{followSituation,jdbcType=VARCHAR},
+      customer_statue = #{customerStatue,jdbcType=VARCHAR},
+      paid = #{paid,jdbcType=VARCHAR},
+      tag = #{tag,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
 </mapper>

+ 362 - 240
src/main/java/com/goafanti/common/model/Customer.java

@@ -3,244 +3,366 @@ package com.goafanti.common.model;
 import java.util.Date;
 
 public class Customer {
-   
-	/**
-	 * id
-	 */
-	private String id;
-
-
-	/**
-	 * 归属人id
-	 */
-	private String aid;
-
-
-	/**
-	 * 客户类型(1-个人用户,2-公司用户)
-	 */
-	private String customerTyp;
-
-
-	/**
-	 * 分享类型(1-个人用户,2-公共用户)
-	 */
-	private Integer shareTyp;
-
-
-	/**
-	 * 代理人id
-	 */
-	private String agentId;
-
-
-	/**
-	 * 公司意向
-	 */
-	private String companyIntention;
-
-
-	/**
-	 * 创建时间
-	 */
-	private Date createTime;
-
-
-	/**
-	 * 跟进进度(0-已发项目介绍资料,1-已约面谈,2-已发合同计划书,3-已报价,4-已发合同,5-已签合同,6-面谈中,7-已面签)
-	 */
-	private String followSituation;
-
-
-	/**
-	 * 客户状态(0-新客户,1-意向客户,2-重点客户,3-面谈客户,4-签单客户,5-被拒绝客户)
-	 */
-	private String customerStatue;
-
-
-	/**
-	 * 上级ID
-	 */
-	private String paid;
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer.id
-	 * @return  the value of customer.id
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public String getId() {
-		return id;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer.id
-	 * @param id  the value for customer.id
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer.aid
-	 * @return  the value of customer.aid
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public String getAid() {
-		return aid;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer.aid
-	 * @param aid  the value for customer.aid
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public void setAid(String aid) {
-		this.aid = aid;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer.customer_typ
-	 * @return  the value of customer.customer_typ
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public String getCustomerTyp() {
-		return customerTyp;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer.customer_typ
-	 * @param customerTyp  the value for customer.customer_typ
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public void setCustomerTyp(String customerTyp) {
-		this.customerTyp = customerTyp;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer.share_typ
-	 * @return  the value of customer.share_typ
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public Integer getShareTyp() {
-		return shareTyp;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer.share_typ
-	 * @param shareTyp  the value for customer.share_typ
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public void setShareTyp(Integer shareTyp) {
-		this.shareTyp = shareTyp;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer.agent_id
-	 * @return  the value of customer.agent_id
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public String getAgentId() {
-		return agentId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer.agent_id
-	 * @param agentId  the value for customer.agent_id
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public void setAgentId(String agentId) {
-		this.agentId = agentId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer.company_intention
-	 * @return  the value of customer.company_intention
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public String getCompanyIntention() {
-		return companyIntention;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer.company_intention
-	 * @param companyIntention  the value for customer.company_intention
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public void setCompanyIntention(String companyIntention) {
-		this.companyIntention = companyIntention;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer.create_time
-	 * @return  the value of customer.create_time
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer.create_time
-	 * @param createTime  the value for customer.create_time
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer.follow_situation
-	 * @return  the value of customer.follow_situation
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public String getFollowSituation() {
-		return followSituation;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer.follow_situation
-	 * @param followSituation  the value for customer.follow_situation
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public void setFollowSituation(String followSituation) {
-		this.followSituation = followSituation;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer.customer_statue
-	 * @return  the value of customer.customer_statue
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public String getCustomerStatue() {
-		return customerStatue;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer.customer_statue
-	 * @param customerStatue  the value for customer.customer_statue
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public void setCustomerStatue(String customerStatue) {
-		this.customerStatue = customerStatue;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column customer.paid
-	 * @return  the value of customer.paid
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public String getPaid() {
-		return paid;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column customer.paid
-	 * @param paid  the value for customer.paid
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
-	 */
-	public void setPaid(String paid) {
-		this.paid = paid;
-	}
-
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column customer.id
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column customer.aid
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    private String aid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column customer.customer_typ
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    private String customerTyp;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column customer.share_typ
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    private Integer shareTyp;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column customer.agent_id
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    private String agentId;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column customer.company_intention
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    private String companyIntention;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column customer.create_time
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    private Date createTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column customer.follow_situation
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    private String followSituation;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column customer.customer_statue
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    private String customerStatue;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column customer.paid
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    private String paid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column customer.tag
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    private String tag;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column customer.id
+     *
+     * @return the value of customer.id
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column customer.id
+     *
+     * @param id the value for customer.id
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column customer.aid
+     *
+     * @return the value of customer.aid
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public String getAid() {
+        return aid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column customer.aid
+     *
+     * @param aid the value for customer.aid
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column customer.customer_typ
+     *
+     * @return the value of customer.customer_typ
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public String getCustomerTyp() {
+        return customerTyp;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column customer.customer_typ
+     *
+     * @param customerTyp the value for customer.customer_typ
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public void setCustomerTyp(String customerTyp) {
+        this.customerTyp = customerTyp;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column customer.share_typ
+     *
+     * @return the value of customer.share_typ
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public Integer getShareTyp() {
+        return shareTyp;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column customer.share_typ
+     *
+     * @param shareTyp the value for customer.share_typ
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public void setShareTyp(Integer shareTyp) {
+        this.shareTyp = shareTyp;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column customer.agent_id
+     *
+     * @return the value of customer.agent_id
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public String getAgentId() {
+        return agentId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column customer.agent_id
+     *
+     * @param agentId the value for customer.agent_id
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public void setAgentId(String agentId) {
+        this.agentId = agentId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column customer.company_intention
+     *
+     * @return the value of customer.company_intention
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public String getCompanyIntention() {
+        return companyIntention;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column customer.company_intention
+     *
+     * @param companyIntention the value for customer.company_intention
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public void setCompanyIntention(String companyIntention) {
+        this.companyIntention = companyIntention;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column customer.create_time
+     *
+     * @return the value of customer.create_time
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column customer.create_time
+     *
+     * @param createTime the value for customer.create_time
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column customer.follow_situation
+     *
+     * @return the value of customer.follow_situation
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public String getFollowSituation() {
+        return followSituation;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column customer.follow_situation
+     *
+     * @param followSituation the value for customer.follow_situation
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public void setFollowSituation(String followSituation) {
+        this.followSituation = followSituation;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column customer.customer_statue
+     *
+     * @return the value of customer.customer_statue
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public String getCustomerStatue() {
+        return customerStatue;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column customer.customer_statue
+     *
+     * @param customerStatue the value for customer.customer_statue
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public void setCustomerStatue(String customerStatue) {
+        this.customerStatue = customerStatue;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column customer.paid
+     *
+     * @return the value of customer.paid
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public String getPaid() {
+        return paid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column customer.paid
+     *
+     * @param paid the value for customer.paid
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public void setPaid(String paid) {
+        this.paid = paid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column customer.tag
+     *
+     * @return the value of customer.tag
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public String getTag() {
+        return tag;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column customer.tag
+     *
+     * @param tag the value for customer.tag
+     *
+     * @mbg.generated Thu Oct 12 20:42:55 CST 2017
+     */
+    public void setTag(String tag) {
+        this.tag = tag;
+    }
 }

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

@@ -7,23 +7,23 @@ import java.util.List;
 public class CustomerExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table customer
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
+	 * @mbg.generated  Thu Oct 12 20:42:55 CST 2017
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table customer
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
+	 * @mbg.generated  Thu Oct 12 20:42:55 CST 2017
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table customer
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
+	 * @mbg.generated  Thu Oct 12 20:42:55 CST 2017
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
+	 * @mbg.generated  Thu Oct 12 20:42:55 CST 2017
 	 */
 	public CustomerExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -31,7 +31,7 @@ public class CustomerExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
+	 * @mbg.generated  Thu Oct 12 20:42:55 CST 2017
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -39,7 +39,7 @@ public class CustomerExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
+	 * @mbg.generated  Thu Oct 12 20:42:55 CST 2017
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -47,7 +47,7 @@ public class CustomerExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
+	 * @mbg.generated  Thu Oct 12 20:42:55 CST 2017
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -55,7 +55,7 @@ public class CustomerExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
+	 * @mbg.generated  Thu Oct 12 20:42:55 CST 2017
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -63,7 +63,7 @@ public class CustomerExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
+	 * @mbg.generated  Thu Oct 12 20:42:55 CST 2017
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -71,7 +71,7 @@ public class CustomerExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
+	 * @mbg.generated  Thu Oct 12 20:42:55 CST 2017
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -79,7 +79,7 @@ public class CustomerExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
+	 * @mbg.generated  Thu Oct 12 20:42:55 CST 2017
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -89,7 +89,7 @@ public class CustomerExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
+	 * @mbg.generated  Thu Oct 12 20:42:55 CST 2017
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -101,7 +101,7 @@ public class CustomerExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
+	 * @mbg.generated  Thu Oct 12 20:42:55 CST 2017
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -110,7 +110,7 @@ public class CustomerExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table customer
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
+	 * @mbg.generated  Thu Oct 12 20:42:55 CST 2017
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -120,7 +120,7 @@ public class CustomerExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table customer
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
+	 * @mbg.generated  Thu Oct 12 20:42:55 CST 2017
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -842,11 +842,81 @@ public class CustomerExample {
 			addCriterion("paid not between", value1, value2, "paid");
 			return (Criteria) this;
 		}
+
+		public Criteria andTagIsNull() {
+			addCriterion("tag is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTagIsNotNull() {
+			addCriterion("tag is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTagEqualTo(String value) {
+			addCriterion("tag =", value, "tag");
+			return (Criteria) this;
+		}
+
+		public Criteria andTagNotEqualTo(String value) {
+			addCriterion("tag <>", value, "tag");
+			return (Criteria) this;
+		}
+
+		public Criteria andTagGreaterThan(String value) {
+			addCriterion("tag >", value, "tag");
+			return (Criteria) this;
+		}
+
+		public Criteria andTagGreaterThanOrEqualTo(String value) {
+			addCriterion("tag >=", value, "tag");
+			return (Criteria) this;
+		}
+
+		public Criteria andTagLessThan(String value) {
+			addCriterion("tag <", value, "tag");
+			return (Criteria) this;
+		}
+
+		public Criteria andTagLessThanOrEqualTo(String value) {
+			addCriterion("tag <=", value, "tag");
+			return (Criteria) this;
+		}
+
+		public Criteria andTagLike(String value) {
+			addCriterion("tag like", value, "tag");
+			return (Criteria) this;
+		}
+
+		public Criteria andTagNotLike(String value) {
+			addCriterion("tag not like", value, "tag");
+			return (Criteria) this;
+		}
+
+		public Criteria andTagIn(List<String> values) {
+			addCriterion("tag in", values, "tag");
+			return (Criteria) this;
+		}
+
+		public Criteria andTagNotIn(List<String> values) {
+			addCriterion("tag not in", values, "tag");
+			return (Criteria) this;
+		}
+
+		public Criteria andTagBetween(String value1, String value2) {
+			addCriterion("tag between", value1, value2, "tag");
+			return (Criteria) this;
+		}
+
+		public Criteria andTagNotBetween(String value1, String value2) {
+			addCriterion("tag not between", value1, value2, "tag");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table customer
-	 * @mbg.generated  Wed Oct 11 15:40:31 CST 2017
+	 * @mbg.generated  Thu Oct 12 20:42:55 CST 2017
 	 */
 	public static class Criterion {
 		private String condition;