Sfoglia il codice sorgente

客户管理系统

wanghui 8 anni fa
parent
commit
25eb3cc7a6
23 ha cambiato i file con 978 aggiunte e 290 eliminazioni
  1. 2 1
      generatorConfig.xml
  2. 6 0
      src/main/java/com/goafanti/common/dao/UserBusinessMapper.java
  3. 11 11
      src/main/java/com/goafanti/common/dao/UserFollowMapper.java
  4. 39 11
      src/main/java/com/goafanti/common/dao/UserMapper.java
  5. 86 0
      src/main/java/com/goafanti/common/mapper/UserBusinessMapper.xml
  6. 30 30
      src/main/java/com/goafanti/common/mapper/UserFollowMapper.xml
  7. 35 20
      src/main/java/com/goafanti/common/mapper/UserMapper.xml
  8. 56 2
      src/main/java/com/goafanti/common/mapper/UserMapperExt.xml
  9. 101 78
      src/main/java/com/goafanti/common/model/User.java
  10. 76 16
      src/main/java/com/goafanti/common/model/UserExample.java
  11. 46 46
      src/main/java/com/goafanti/common/model/UserFollow.java
  12. 40 50
      src/main/java/com/goafanti/common/model/UserFollowExample.java
  13. 76 0
      src/main/java/com/goafanti/customer/bo/BusinessListBo.java
  14. 28 0
      src/main/java/com/goafanti/customer/bo/BussinessFollowBo.java
  15. 11 1
      src/main/java/com/goafanti/customer/bo/CustomerListIn.java
  16. 27 0
      src/main/java/com/goafanti/customer/bo/CustomerOrganizationDetailBo.java
  17. 7 0
      src/main/java/com/goafanti/customer/bo/CustomerPersonalDetailBo.java
  18. 49 0
      src/main/java/com/goafanti/customer/controller/BusinessApiController.java
  19. 33 1
      src/main/java/com/goafanti/customer/controller/CustomerController.java
  20. 36 0
      src/main/java/com/goafanti/customer/service/BusinessService.java
  21. 35 13
      src/main/java/com/goafanti/customer/service/CustomerService.java
  22. 94 0
      src/main/java/com/goafanti/customer/service/impl/BusinessServiceImpl.java
  23. 54 10
      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="organization_contact_book"/>
+    <table schema="aft" tableName="user"/>
+    <table schema="aft" tableName="user_follow"/>
   </context>
 </generatorConfiguration>

+ 6 - 0
src/main/java/com/goafanti/common/dao/UserBusinessMapper.java

@@ -2,6 +2,8 @@ package com.goafanti.common.dao;
 
 import com.goafanti.common.model.UserBusiness;
 import com.goafanti.common.model.UserBusinessExample;
+import com.goafanti.customer.bo.BusinessListBo;
+
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
@@ -72,4 +74,8 @@ public interface UserBusinessMapper {
 	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
 	 */
 	int updateByPrimaryKey(UserBusiness record);
+
+	List<BusinessListBo> findBusinessGlossory();
+
+	int judgeBusiness(@Param("uid")String uid,@Param("businessGlossoryId")Integer businessGlossoryId,@Param("aid")String aid);
 }

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

@@ -9,67 +9,67 @@ public interface UserFollowMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	long countByExample(UserFollowExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	int deleteByExample(UserFollowExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	int deleteByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	int insert(UserFollow record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	int insertSelective(UserFollow record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	List<UserFollow> selectByExample(UserFollowExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	UserFollow selectByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	int updateByExampleSelective(@Param("record") UserFollow record, @Param("example") UserFollowExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	int updateByExample(@Param("record") UserFollow record, @Param("example") UserFollowExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	int updateByPrimaryKeySelective(UserFollow record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	int updateByPrimaryKey(UserFollow record);
 }

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

@@ -11,72 +11,74 @@ import com.goafanti.user.bo.UserDownLoadBo;
 import com.goafanti.user.bo.UserPageHomeBo;
 import com.goafanti.user.bo.UserPartnerDetailBo;
 import com.goafanti.common.model.UserExample;
+import com.goafanti.customer.bo.CustomerOrganizationDetailBo;
+import com.goafanti.customer.bo.CustomerPersonalDetailBo;
 import com.goafanti.customer.bo.CustomerSimpleBo;
 
 public interface UserMapper {
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	long countByExample(UserExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	int deleteByExample(UserExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	int deleteByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	int insert(User record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	int insertSelective(User record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	List<User> selectByExample(UserExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	User selectByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	int updateByExample(@Param("record") User record, @Param("example") UserExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	int updateByPrimaryKeySelective(User record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	int updateByPrimaryKey(User record);
 
@@ -100,7 +102,33 @@ public interface UserMapper {
 	
 	User selectByMobieAndType(String mobile, Integer type);
 	
+	/**
+	 * 根据客户名模糊搜?
+	 * @param name
+	 * @return
+	 */
 	List<CustomerSimpleBo> findCustomerByName(@Param("name")String name);
 
+	/**
+	 * 判断客户是否存在
+	 * @param name
+	 * @return
+	 */
 	int judgeCustomerByName(String name);
+	
+	/**
+	 * 查询单位客户详情
+	 * @param uid 用户ID
+	 * @return
+	 */
+	CustomerPersonalDetailBo findPersonalCustomerDetail(@Param("uid")String uid);
+	
+	
+	/**
+	 * 查询单位客户详情
+	 * @param uid 用户ID
+	 * @return
+	 */
+	CustomerOrganizationDetailBo findOrganizationCustomerDetail(@Param("uid")String uid);
+
 }

+ 86 - 0
src/main/java/com/goafanti/common/mapper/UserBusinessMapper.xml

@@ -348,4 +348,90 @@
       remarks = #{remarks,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
+  <select id="selectBusinessList"  parameterType="com.goafanti.customer.bo.BusinessListBo" resultType="com.goafanti.customer.bo.BusinessListBo">
+	  select
+		c.name as businessName,
+		b.identify_name as identifyName,
+		a.id,
+		a.create_time as createTime,
+		a.follow_situation as followSituation,
+		a.customer_status as customerStatus,
+		d.name as adminName
+	from
+		user_business a left join user b on
+		a.uid = b.id left join business_glossory c on
+		a.business_glossory_id = c.id left join admin d on
+		a.uid = d.id
+	where a.aid = #{adminId,jdbcType=VARCHAR}
+	<if test="businessId !=null and businessId != ''">
+		and c.id = #{businessId,jdbcType=VARCHAR}
+	</if>
+	<if test="identifyName != null and identifyName != ''">
+		b.identify_name = #{identifyName,jdbcType=VARCHAR}
+	</if>
+	<if test="followSituation != null">
+		a.follow_situation = #{followSituation,jdbcType=INTEGER}
+	</if>
+	<if test="customerStatus != null">
+		a.customer_status = #{customerStatus,jdbcType=INTEGER}
+	</if>
+	<if test="adminName != null and adminName != ''">
+		d.name = #{adminName,jdbcType=VARCHAR}
+	</if>
+	<if test="startDate != null and startDate != ''">
+		and a.create_time &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
+	</if>
+	<if test="endDate != null and endDate != ''">
+		and a.create_time &lt; STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
+	</if>
+	<if test="page_sql != null">
+    	${page_sql}
+    </if>
+  </select>
+  <select id="selectBusinessCount" parameterType="com.goafanti.customer.bo.BusinessListBo" resultType="java.lang.Integer">
+  	select
+  		count(0)
+  	from
+		user_business a left join user b on
+		a.uid = b.id left join business_glossory c on
+		a.business_glossory_id = c.id left join admin d on
+		a.uid = d.id
+	where a.aid = #{adminId,jdbcType=VARCHAR}
+	<if test="businessId !=null and businessId != ''">
+		and c.id = #{businessId,jdbcType=VARCHAR}
+	</if>
+	<if test="identifyName != null and identifyName != ''">
+		b.identify_name = #{identifyName,jdbcType=VARCHAR}
+	</if>
+	<if test="followSituation != null">
+		a.follow_situation = #{followSituation,jdbcType=INTEGER}
+	</if>
+	<if test="customerStatus != null">
+		a.customer_status = #{customerStatus,jdbcType=INTEGER}
+	</if>
+	<if test="adminName != null and adminName != ''">
+		d.name = #{adminName,jdbcType=VARCHAR}
+	</if>
+	<if test="startDate != null and startDate != ''">
+		and a.create_time &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
+	</if>
+	<if test="endDate != null and endDate != ''">
+		and a.create_time &lt; STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
+	</if>		
+  </select>
+  
+  <select id="findBusinessGlossory" resultType="com.goafanti.customer.bo.BusinessListBo">
+  	select id as businessId,name as businessName from business_glossory
+  </select>
+  
+  <select id="judgeBusiness" resultType="java.lang.Integer">
+  	select count(0) from user_business where
+  	 uid = #{uid,jdbcType=VARCHAR}
+  	 <if test="businessGlossoryId != null and businessGlossoryId != ''">
+  	  	and business_glossory_id = #{businessGlossoryId,jdbcType=INTEGER}
+  	 </if>
+  	 <if test="aid != null and aid != ''">
+  	 	and aid = #{aid,jdbcType=VARCHAR}
+  	 </if>
+  </select>
 </mapper>

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

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 10 19:10:10 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="uid" jdbcType="VARCHAR" property="uid" />
@@ -15,7 +15,7 @@
     <result column="attachment_url" jdbcType="VARCHAR" property="attachmentUrl" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="ocb_id" jdbcType="VARCHAR" property="ocbId" />
-    <result column="contact_information" jdbcType="VARCHAR" property="contactInformation" />
+    <result column="contact_type" jdbcType="INTEGER" property="contactType" />
     <result column="effective" jdbcType="INTEGER" property="effective" />
     <result column="time_stamp" jdbcType="TIMESTAMP" property="timeStamp" />
     <result column="follow_count" jdbcType="INTEGER" property="followCount" />
@@ -24,7 +24,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 10 19:10:10 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -58,7 +58,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 10 19:10:10 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -92,16 +92,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 10 19:10:10 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
-    id, uid, aid, paid, result, attachment_url, create_time, ocb_id, contact_information, 
-    effective, time_stamp, follow_count
+    id, uid, aid, paid, result, attachment_url, create_time, ocb_id, contact_type, effective, 
+    time_stamp, follow_count
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.UserFollowExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 10 19:10:10 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     select
     <if test="distinct">
@@ -120,7 +120,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 10 19:10:10 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -131,7 +131,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 10 19:10:10 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     delete from user_follow
     where id = #{id,jdbcType=VARCHAR}
@@ -140,7 +140,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 10 19:10:10 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     delete from user_follow
     <if test="_parameter != null">
@@ -151,16 +151,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 10 19:10:10 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     insert into user_follow (id, uid, aid, 
       paid, result, attachment_url, 
-      create_time, ocb_id, contact_information, 
+      create_time, ocb_id, contact_type, 
       effective, time_stamp, follow_count
       )
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
       #{paid,jdbcType=VARCHAR}, #{result,jdbcType=VARCHAR}, #{attachmentUrl,jdbcType=VARCHAR}, 
-      #{createTime,jdbcType=TIMESTAMP}, #{ocbId,jdbcType=VARCHAR}, #{contactInformation,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{ocbId,jdbcType=VARCHAR}, #{contactType,jdbcType=INTEGER}, 
       #{effective,jdbcType=INTEGER}, #{timeStamp,jdbcType=TIMESTAMP}, #{followCount,jdbcType=INTEGER}
       )
   </insert>
@@ -168,7 +168,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 10 19:10:10 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     insert into user_follow
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -196,8 +196,8 @@
       <if test="ocbId != null">
         ocb_id,
       </if>
-      <if test="contactInformation != null">
-        contact_information,
+      <if test="contactType != null">
+        contact_type,
       </if>
       <if test="effective != null">
         effective,
@@ -234,8 +234,8 @@
       <if test="ocbId != null">
         #{ocbId,jdbcType=VARCHAR},
       </if>
-      <if test="contactInformation != null">
-        #{contactInformation,jdbcType=VARCHAR},
+      <if test="contactType != null">
+        #{contactType,jdbcType=INTEGER},
       </if>
       <if test="effective != null">
         #{effective,jdbcType=INTEGER},
@@ -252,7 +252,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 10 19:10:10 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     select count(*) from user_follow
     <if test="_parameter != null">
@@ -263,7 +263,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 10 19:10:10 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     update user_follow
     <set>
@@ -291,8 +291,8 @@
       <if test="record.ocbId != null">
         ocb_id = #{record.ocbId,jdbcType=VARCHAR},
       </if>
-      <if test="record.contactInformation != null">
-        contact_information = #{record.contactInformation,jdbcType=VARCHAR},
+      <if test="record.contactType != null">
+        contact_type = #{record.contactType,jdbcType=INTEGER},
       </if>
       <if test="record.effective != null">
         effective = #{record.effective,jdbcType=INTEGER},
@@ -312,7 +312,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 10 19:10:10 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     update user_follow
     set id = #{record.id,jdbcType=VARCHAR},
@@ -323,7 +323,7 @@
       attachment_url = #{record.attachmentUrl,jdbcType=VARCHAR},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       ocb_id = #{record.ocbId,jdbcType=VARCHAR},
-      contact_information = #{record.contactInformation,jdbcType=VARCHAR},
+      contact_type = #{record.contactType,jdbcType=INTEGER},
       effective = #{record.effective,jdbcType=INTEGER},
       time_stamp = #{record.timeStamp,jdbcType=TIMESTAMP},
       follow_count = #{record.followCount,jdbcType=INTEGER}
@@ -335,7 +335,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 10 19:10:10 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     update user_follow
     <set>
@@ -360,8 +360,8 @@
       <if test="ocbId != null">
         ocb_id = #{ocbId,jdbcType=VARCHAR},
       </if>
-      <if test="contactInformation != null">
-        contact_information = #{contactInformation,jdbcType=VARCHAR},
+      <if test="contactType != null">
+        contact_type = #{contactType,jdbcType=INTEGER},
       </if>
       <if test="effective != null">
         effective = #{effective,jdbcType=INTEGER},
@@ -379,7 +379,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Nov 10 19:10:10 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     update user_follow
     set uid = #{uid,jdbcType=VARCHAR},
@@ -389,7 +389,7 @@
       attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       ocb_id = #{ocbId,jdbcType=VARCHAR},
-      contact_information = #{contactInformation,jdbcType=VARCHAR},
+      contact_type = #{contactType,jdbcType=INTEGER},
       effective = #{effective,jdbcType=INTEGER},
       time_stamp = #{timeStamp,jdbcType=TIMESTAMP},
       follow_count = #{followCount,jdbcType=INTEGER}

+ 35 - 20
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Nov 12 10:11:30 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="mobile" jdbcType="VARCHAR" property="mobile" />
@@ -33,12 +33,13 @@
     <result column="organization_id" jdbcType="VARCHAR" property="organizationId" />
     <result column="share_type" jdbcType="INTEGER" property="shareType" />
     <result column="identify_name" jdbcType="VARCHAR" property="identifyName" />
+    <result column="is_member" jdbcType="INTEGER" property="isMember" />
   </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 Sun Nov 12 10:11:30 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -72,7 +73,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Nov 12 10:11:30 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -106,18 +107,18 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Nov 12 10:11:30 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     id, mobile, password, nickname, email, create_time, number, lvl, type, aid, mid, 
     status, source, update_time, company_logo_url, head_portrait_url, society_tag, introduction, 
     service_certification, user_certification, last_member_order_id, current_member_status, 
-    value_added_tag, organization_id, share_type, identify_name
+    value_added_tag, organization_id, share_type, identify_name, is_member
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.UserExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Nov 12 10:11:30 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     select
     <if test="distinct">
@@ -136,7 +137,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Nov 12 10:11:30 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -147,7 +148,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Nov 12 10:11:30 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     delete from user
     where id = #{id,jdbcType=VARCHAR}
@@ -156,7 +157,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Nov 12 10:11:30 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     delete from user
     <if test="_parameter != null">
@@ -167,7 +168,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Nov 12 10:11:30 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     insert into user (id, mobile, password, 
       nickname, email, create_time, 
@@ -177,7 +178,7 @@
       society_tag, introduction, service_certification, 
       user_certification, last_member_order_id, current_member_status, 
       value_added_tag, organization_id, share_type, 
-      identify_name)
+      identify_name, is_member)
     values (#{id,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, 
       #{nickname,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
       #{number,jdbcType=BIGINT}, #{lvl,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR}, 
@@ -186,13 +187,13 @@
       #{societyTag,jdbcType=VARCHAR}, #{introduction,jdbcType=VARCHAR}, #{serviceCertification,jdbcType=INTEGER}, 
       #{userCertification,jdbcType=INTEGER}, #{lastMemberOrderId,jdbcType=VARCHAR}, #{currentMemberStatus,jdbcType=INTEGER}, 
       #{valueAddedTag,jdbcType=VARCHAR}, #{organizationId,jdbcType=VARCHAR}, #{shareType,jdbcType=INTEGER}, 
-      #{identifyName,jdbcType=VARCHAR})
+      #{identifyName,jdbcType=VARCHAR}, #{isMember,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.User">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Nov 12 10:11:30 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     insert into user
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -274,6 +275,9 @@
       <if test="identifyName != null">
         identify_name,
       </if>
+      <if test="isMember != null">
+        is_member,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -354,13 +358,16 @@
       <if test="identifyName != null">
         #{identifyName,jdbcType=VARCHAR},
       </if>
+      <if test="isMember != null">
+        #{isMember,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.UserExample" resultType="java.lang.Long">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Nov 12 10:11:30 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     select count(*) from user
     <if test="_parameter != null">
@@ -371,7 +378,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Nov 12 10:11:30 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     update user
     <set>
@@ -453,6 +460,9 @@
       <if test="record.identifyName != null">
         identify_name = #{record.identifyName,jdbcType=VARCHAR},
       </if>
+      <if test="record.isMember != null">
+        is_member = #{record.isMember,jdbcType=INTEGER},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -462,7 +472,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Nov 12 10:11:30 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     update user
     set id = #{record.id,jdbcType=VARCHAR},
@@ -490,7 +500,8 @@
       value_added_tag = #{record.valueAddedTag,jdbcType=VARCHAR},
       organization_id = #{record.organizationId,jdbcType=VARCHAR},
       share_type = #{record.shareType,jdbcType=INTEGER},
-      identify_name = #{record.identifyName,jdbcType=VARCHAR}
+      identify_name = #{record.identifyName,jdbcType=VARCHAR},
+      is_member = #{record.isMember,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -499,7 +510,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Nov 12 10:11:30 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     update user
     <set>
@@ -578,6 +589,9 @@
       <if test="identifyName != null">
         identify_name = #{identifyName,jdbcType=VARCHAR},
       </if>
+      <if test="isMember != null">
+        is_member = #{isMember,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -585,7 +599,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Nov 12 10:11:30 CST 2017.
+      This element was generated on Tue Nov 14 19:38:26 CST 2017.
     -->
     update user
     set mobile = #{mobile,jdbcType=VARCHAR},
@@ -612,7 +626,8 @@
       value_added_tag = #{valueAddedTag,jdbcType=VARCHAR},
       organization_id = #{organizationId,jdbcType=VARCHAR},
       share_type = #{shareType,jdbcType=INTEGER},
-      identify_name = #{identifyName,jdbcType=VARCHAR}
+      identify_name = #{identifyName,jdbcType=VARCHAR},
+      is_member = #{isMember,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
  

+ 56 - 2
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -6,7 +6,7 @@
 		a.id as uid,a.type,a.status, date_format(a.create_time,'%Y-%m-%d %H:%i:%s') as createTime,
 		a.service_certification as serviceCertification,
 		a.user_certification as userCertification,a.current_member_status as
-		currentMemberStatus,a.identify_name as name,a.lvl,
+		currentMemberStatus,a.identify_name as name,a.lvl,a.is_member as isMember,
 		b.contacts,b.contact_mobile as
 		contactMobile,b.international,b.expert,b.celebrity,
 		dg1.name as province,dg2.name as city, dg3.name as area,c.name as industry
@@ -33,6 +33,9 @@
 		<if test="currentMemberStatus != null">
 			and current_member_status = #{currentMemberStatus,jdbcType=INTEGER}
 		</if>
+		<if test="isMember != null">
+			and is_member = #{isMember,jdbcType=INTEGER}
+		</if>
 		<if test="startDate != null and startDate != ''">
 			and create_time &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
 		</if>
@@ -66,6 +69,10 @@
 		<if test="celebrity != null">
 			and b.celebrity = #{celebrity,jdbcType=INTEGER}
 		</if>
+			order by a.create_time desc 
+		 <if test="page_sql != null">
+    		${page_sql}
+   		 </if>
 	</select>
 	<select id="selectPersonalCustomerCount" resultType="java.lang.Integer">
 		select
@@ -93,6 +100,9 @@
 		<if test="currentMemberStatus != null">
 			and current_member_status = #{currentMemberStatus,jdbcType=INTEGER}
 		</if>
+		<if test="isMember != null">
+			and is_member = #{isMember,jdbcType=INTEGER}
+		</if>
 		<if test="startDate != null and startDate != ''">
 			and create_time &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
 		</if>
@@ -129,7 +139,7 @@
 		%H:%i:%s') as createTime,a.service_certification as
 		serviceCertification,
 		a.user_certification as userCertification,a.current_member_status as
-		currentMemberStatus,a.identify_name as name,a.lvl,
+		currentMemberStatus,a.identify_name as name,a.lvl,a.is_member as isMember,
 		b.contacts,b.contact_mobile as contactMobile,b.international,b.listed,b.high_tech_zone as highTechZone,
 		dg1.name as province,dg2.name as city, dg3.name as area,c.name as industry
 		from
@@ -155,6 +165,9 @@
 		<if test="currentMemberStatus != null">
 			and current_member_status = #{currentMemberStatus,jdbcType=INTEGER}
 		</if>
+		<if test="isMember != null">
+			and is_member = #{isMember,jdbcType=INTEGER}
+		</if>
 		<if test="startDate != null and startDate != ''">
 			and create_time &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
 		</if>
@@ -188,6 +201,10 @@
 		<if test="highTechZone != null">
 			and b.high_tech_zone = #{highTechZone,jdbcType=INTEGER}
 		</if>
+			order by a.create_time desc 
+		 <if test="page_sql != null">
+    		${page_sql}
+   		 </if>
 	</select>
 	<select id="selectOrganizationCustomerCount" resultType="java.lang.Integer">
 		select
@@ -215,6 +232,9 @@
 		<if test="currentMemberStatus != null">
 			and current_member_status = #{currentMemberStatus,jdbcType=INTEGER}
 		</if>
+		<if test="isMember != null">
+			and is_member = #{isMember,jdbcType=INTEGER}
+		</if>
 		<if test="startDate != null and startDate != ''">
 			and create_time &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
 		</if>
@@ -254,4 +274,38 @@
 	<select id="judgeCustomerByName" parameterType="java.lang.String" resultType="java.lang.Integer">
 		select count(0) from user where identify_name = #{name,jdbcType=VARCHAR}
 	</select>
+	
+	<select id="findOrganizationCustomerDetail" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerOrganizationDetailBo">
+		select 
+			a.id as uid,
+			a.society_tag as societyTag,
+			a.company_logo_url as companyLogoUrl,
+			a.introduction,
+			b.unit_name as unitName,
+			b.industry,
+			b.location_province as locationProvince,
+			b.location_city as locationCity,
+			b.location_area as locationArea,
+			b.postal_address as postalAddress,
+			b.contacts_fixed_tel as contactsFixedTel,
+			b.contacts_fax as contactsFax,
+			b.registered_capital registeredCapital,
+			b.enterprise_scale as enterpriseScale,
+			b.legal_person as legalPerson,
+			b.legal_person_id_card as legalPersonIdCard,
+			b.legal_person_tel as legalPersonTel,
+			b.legal_person_email as legalPersonEmail,
+			b.high_tech_zone highTechZone,
+			b.listed,
+			b.org_code as orgCode,
+			b.org_code_url as orgCodeUrl,
+			b.business_scope as businessScope,
+			b.id
+		from 
+		(select 
+			id,society_tag,company_logo_url,introduction
+		from user
+			where id = #{uid,jdbcType=VARCHAR}
+		)as a inner join organization_identity b on a.id = b.uid
+	</select>
 </mapper>

+ 101 - 78
src/main/java/com/goafanti/common/model/User.java

@@ -5,139 +5,144 @@ import java.util.Date;
 public class User implements AftUser{
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.id
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.mobile
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String mobile;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.password
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String password;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.nickname
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String nickname;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.email
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String email;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.create_time
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private Date createTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.number
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private Long number;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.lvl
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private Integer lvl;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.type
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private Integer type;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.aid
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String aid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.mid
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String mid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.status
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private Integer status;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.source
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private Integer source;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.update_time
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private Date updateTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.company_logo_url
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String companyLogoUrl;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.head_portrait_url
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String headPortraitUrl;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.society_tag
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String societyTag;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.introduction
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String introduction;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.service_certification
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private Integer serviceCertification;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.user_certification
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private Integer userCertification;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.last_member_order_id
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String lastMemberOrderId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.current_member_status
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private Integer currentMemberStatus;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.value_added_tag
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String valueAddedTag;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.organization_id
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String organizationId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.share_type
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private Integer shareType;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.identify_name
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String identifyName;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.is_member
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
+	 */
+	private Integer isMember;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.id
 	 * @return  the value of user.id
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getId() {
 		return id;
@@ -146,7 +151,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.id
 	 * @param id  the value for user.id
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setId(String id) {
 		this.id = id;
@@ -155,7 +160,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.mobile
 	 * @return  the value of user.mobile
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getMobile() {
 		return mobile;
@@ -164,7 +169,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.mobile
 	 * @param mobile  the value for user.mobile
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setMobile(String mobile) {
 		this.mobile = mobile;
@@ -173,7 +178,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.password
 	 * @return  the value of user.password
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getPassword() {
 		return password;
@@ -182,7 +187,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.password
 	 * @param password  the value for user.password
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setPassword(String password) {
 		this.password = password;
@@ -191,7 +196,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.nickname
 	 * @return  the value of user.nickname
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getNickname() {
 		return nickname;
@@ -200,7 +205,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.nickname
 	 * @param nickname  the value for user.nickname
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setNickname(String nickname) {
 		this.nickname = nickname;
@@ -209,7 +214,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.email
 	 * @return  the value of user.email
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getEmail() {
 		return email;
@@ -218,7 +223,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.email
 	 * @param email  the value for user.email
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setEmail(String email) {
 		this.email = email;
@@ -227,7 +232,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.create_time
 	 * @return  the value of user.create_time
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -236,7 +241,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.create_time
 	 * @param createTime  the value for user.create_time
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -245,7 +250,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.number
 	 * @return  the value of user.number
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Long getNumber() {
 		return number;
@@ -254,7 +259,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.number
 	 * @param number  the value for user.number
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setNumber(Long number) {
 		this.number = number;
@@ -263,7 +268,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.lvl
 	 * @return  the value of user.lvl
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Integer getLvl() {
 		return lvl;
@@ -272,7 +277,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.lvl
 	 * @param lvl  the value for user.lvl
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setLvl(Integer lvl) {
 		this.lvl = lvl;
@@ -281,7 +286,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.type
 	 * @return  the value of user.type
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Integer getType() {
 		return type;
@@ -290,7 +295,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.type
 	 * @param type  the value for user.type
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setType(Integer type) {
 		this.type = type;
@@ -299,7 +304,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.aid
 	 * @return  the value of user.aid
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getAid() {
 		return aid;
@@ -308,7 +313,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.aid
 	 * @param aid  the value for user.aid
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setAid(String aid) {
 		this.aid = aid;
@@ -317,7 +322,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.mid
 	 * @return  the value of user.mid
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getMid() {
 		return mid;
@@ -326,7 +331,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.mid
 	 * @param mid  the value for user.mid
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setMid(String mid) {
 		this.mid = mid;
@@ -335,7 +340,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.status
 	 * @return  the value of user.status
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Integer getStatus() {
 		return status;
@@ -344,7 +349,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.status
 	 * @param status  the value for user.status
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setStatus(Integer status) {
 		this.status = status;
@@ -353,7 +358,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.source
 	 * @return  the value of user.source
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Integer getSource() {
 		return source;
@@ -362,7 +367,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.source
 	 * @param source  the value for user.source
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setSource(Integer source) {
 		this.source = source;
@@ -371,7 +376,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.update_time
 	 * @return  the value of user.update_time
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Date getUpdateTime() {
 		return updateTime;
@@ -380,7 +385,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.update_time
 	 * @param updateTime  the value for user.update_time
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setUpdateTime(Date updateTime) {
 		this.updateTime = updateTime;
@@ -389,7 +394,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.company_logo_url
 	 * @return  the value of user.company_logo_url
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getCompanyLogoUrl() {
 		return companyLogoUrl;
@@ -398,7 +403,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.company_logo_url
 	 * @param companyLogoUrl  the value for user.company_logo_url
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setCompanyLogoUrl(String companyLogoUrl) {
 		this.companyLogoUrl = companyLogoUrl;
@@ -407,7 +412,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.head_portrait_url
 	 * @return  the value of user.head_portrait_url
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getHeadPortraitUrl() {
 		return headPortraitUrl;
@@ -416,7 +421,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.head_portrait_url
 	 * @param headPortraitUrl  the value for user.head_portrait_url
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setHeadPortraitUrl(String headPortraitUrl) {
 		this.headPortraitUrl = headPortraitUrl;
@@ -425,7 +430,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.society_tag
 	 * @return  the value of user.society_tag
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getSocietyTag() {
 		return societyTag;
@@ -434,7 +439,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.society_tag
 	 * @param societyTag  the value for user.society_tag
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setSocietyTag(String societyTag) {
 		this.societyTag = societyTag;
@@ -443,7 +448,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.introduction
 	 * @return  the value of user.introduction
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getIntroduction() {
 		return introduction;
@@ -452,7 +457,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.introduction
 	 * @param introduction  the value for user.introduction
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setIntroduction(String introduction) {
 		this.introduction = introduction;
@@ -461,7 +466,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.service_certification
 	 * @return  the value of user.service_certification
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Integer getServiceCertification() {
 		return serviceCertification;
@@ -470,7 +475,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.service_certification
 	 * @param serviceCertification  the value for user.service_certification
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setServiceCertification(Integer serviceCertification) {
 		this.serviceCertification = serviceCertification;
@@ -479,7 +484,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.user_certification
 	 * @return  the value of user.user_certification
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Integer getUserCertification() {
 		return userCertification;
@@ -488,7 +493,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.user_certification
 	 * @param userCertification  the value for user.user_certification
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setUserCertification(Integer userCertification) {
 		this.userCertification = userCertification;
@@ -497,7 +502,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.last_member_order_id
 	 * @return  the value of user.last_member_order_id
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getLastMemberOrderId() {
 		return lastMemberOrderId;
@@ -506,7 +511,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.last_member_order_id
 	 * @param lastMemberOrderId  the value for user.last_member_order_id
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setLastMemberOrderId(String lastMemberOrderId) {
 		this.lastMemberOrderId = lastMemberOrderId;
@@ -515,7 +520,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.current_member_status
 	 * @return  the value of user.current_member_status
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Integer getCurrentMemberStatus() {
 		return currentMemberStatus;
@@ -524,7 +529,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.current_member_status
 	 * @param currentMemberStatus  the value for user.current_member_status
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setCurrentMemberStatus(Integer currentMemberStatus) {
 		this.currentMemberStatus = currentMemberStatus;
@@ -533,7 +538,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.value_added_tag
 	 * @return  the value of user.value_added_tag
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getValueAddedTag() {
 		return valueAddedTag;
@@ -542,7 +547,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.value_added_tag
 	 * @param valueAddedTag  the value for user.value_added_tag
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setValueAddedTag(String valueAddedTag) {
 		this.valueAddedTag = valueAddedTag;
@@ -551,7 +556,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.organization_id
 	 * @return  the value of user.organization_id
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getOrganizationId() {
 		return organizationId;
@@ -560,7 +565,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.organization_id
 	 * @param organizationId  the value for user.organization_id
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setOrganizationId(String organizationId) {
 		this.organizationId = organizationId;
@@ -569,7 +574,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.share_type
 	 * @return  the value of user.share_type
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Integer getShareType() {
 		return shareType;
@@ -578,7 +583,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.share_type
 	 * @param shareType  the value for user.share_type
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setShareType(Integer shareType) {
 		this.shareType = shareType;
@@ -587,7 +592,7 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.identify_name
 	 * @return  the value of user.identify_name
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getIdentifyName() {
 		return identifyName;
@@ -596,13 +601,31 @@ public class User implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.identify_name
 	 * @param identifyName  the value for user.identify_name
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setIdentifyName(String identifyName) {
 		this.identifyName = identifyName;
 	}
 
 	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.is_member
+	 * @return  the value of user.is_member
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
+	 */
+	public Integer getIsMember() {
+		return isMember;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.is_member
+	 * @param isMember  the value for user.is_member
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
+	 */
+	public void setIsMember(Integer isMember) {
+		this.isMember = isMember;
+	}
+
+	/**
 	 * 
 	 */
 	private static final long serialVersionUID = 3623836456120030806L;

+ 76 - 16
src/main/java/com/goafanti/common/model/UserExample.java

@@ -7,23 +7,23 @@ import java.util.List;
 public class UserExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public UserExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -31,7 +31,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -39,7 +39,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -47,7 +47,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -55,7 +55,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -63,7 +63,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -71,7 +71,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -79,7 +79,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -89,7 +89,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -101,7 +101,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -110,7 +110,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -120,7 +120,7 @@ public class UserExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -1872,11 +1872,71 @@ public class UserExample {
 			addCriterion("identify_name not between", value1, value2, "identifyName");
 			return (Criteria) this;
 		}
+
+		public Criteria andIsMemberIsNull() {
+			addCriterion("is_member is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIsMemberIsNotNull() {
+			addCriterion("is_member is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIsMemberEqualTo(Integer value) {
+			addCriterion("is_member =", value, "isMember");
+			return (Criteria) this;
+		}
+
+		public Criteria andIsMemberNotEqualTo(Integer value) {
+			addCriterion("is_member <>", value, "isMember");
+			return (Criteria) this;
+		}
+
+		public Criteria andIsMemberGreaterThan(Integer value) {
+			addCriterion("is_member >", value, "isMember");
+			return (Criteria) this;
+		}
+
+		public Criteria andIsMemberGreaterThanOrEqualTo(Integer value) {
+			addCriterion("is_member >=", value, "isMember");
+			return (Criteria) this;
+		}
+
+		public Criteria andIsMemberLessThan(Integer value) {
+			addCriterion("is_member <", value, "isMember");
+			return (Criteria) this;
+		}
+
+		public Criteria andIsMemberLessThanOrEqualTo(Integer value) {
+			addCriterion("is_member <=", value, "isMember");
+			return (Criteria) this;
+		}
+
+		public Criteria andIsMemberIn(List<Integer> values) {
+			addCriterion("is_member in", values, "isMember");
+			return (Criteria) this;
+		}
+
+		public Criteria andIsMemberNotIn(List<Integer> values) {
+			addCriterion("is_member not in", values, "isMember");
+			return (Criteria) this;
+		}
+
+		public Criteria andIsMemberBetween(Integer value1, Integer value2) {
+			addCriterion("is_member between", value1, value2, "isMember");
+			return (Criteria) this;
+		}
+
+		public Criteria andIsMemberNotBetween(Integer value1, Integer value2) {
+			addCriterion("is_member not between", value1, value2, "isMember");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table user
-	 * @mbg.generated  Sun Nov 12 10:11:30 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public static class Criterion {
 		private String condition;

+ 46 - 46
src/main/java/com/goafanti/common/model/UserFollow.java

@@ -6,69 +6,69 @@ public class UserFollow {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_follow.id
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_follow.uid
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String uid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_follow.aid
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String aid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_follow.paid
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String paid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_follow.result
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String result;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_follow.attachment_url
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String attachmentUrl;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_follow.create_time
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private Date createTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_follow.ocb_id
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private String ocbId;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_follow.contact_information
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_follow.contact_type
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
-	private String contactInformation;
+	private Integer contactType;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_follow.effective
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private Integer effective;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_follow.time_stamp
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private Date timeStamp;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_follow.follow_count
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	private Integer followCount;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_follow.id
 	 * @return  the value of user_follow.id
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getId() {
 		return id;
@@ -77,7 +77,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_follow.id
 	 * @param id  the value for user_follow.id
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setId(String id) {
 		this.id = id;
@@ -86,7 +86,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_follow.uid
 	 * @return  the value of user_follow.uid
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getUid() {
 		return uid;
@@ -95,7 +95,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_follow.uid
 	 * @param uid  the value for user_follow.uid
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setUid(String uid) {
 		this.uid = uid;
@@ -104,7 +104,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_follow.aid
 	 * @return  the value of user_follow.aid
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getAid() {
 		return aid;
@@ -113,7 +113,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_follow.aid
 	 * @param aid  the value for user_follow.aid
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setAid(String aid) {
 		this.aid = aid;
@@ -122,7 +122,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_follow.paid
 	 * @return  the value of user_follow.paid
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getPaid() {
 		return paid;
@@ -131,7 +131,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_follow.paid
 	 * @param paid  the value for user_follow.paid
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setPaid(String paid) {
 		this.paid = paid;
@@ -140,7 +140,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_follow.result
 	 * @return  the value of user_follow.result
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getResult() {
 		return result;
@@ -149,7 +149,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_follow.result
 	 * @param result  the value for user_follow.result
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setResult(String result) {
 		this.result = result;
@@ -158,7 +158,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_follow.attachment_url
 	 * @return  the value of user_follow.attachment_url
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getAttachmentUrl() {
 		return attachmentUrl;
@@ -167,7 +167,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_follow.attachment_url
 	 * @param attachmentUrl  the value for user_follow.attachment_url
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setAttachmentUrl(String attachmentUrl) {
 		this.attachmentUrl = attachmentUrl;
@@ -176,7 +176,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_follow.create_time
 	 * @return  the value of user_follow.create_time
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -185,7 +185,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_follow.create_time
 	 * @param createTime  the value for user_follow.create_time
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -194,7 +194,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_follow.ocb_id
 	 * @return  the value of user_follow.ocb_id
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getOcbId() {
 		return ocbId;
@@ -203,34 +203,34 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_follow.ocb_id
 	 * @param ocbId  the value for user_follow.ocb_id
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setOcbId(String ocbId) {
 		this.ocbId = ocbId;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_follow.contact_information
-	 * @return  the value of user_follow.contact_information
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_follow.contact_type
+	 * @return  the value of user_follow.contact_type
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
-	public String getContactInformation() {
-		return contactInformation;
+	public Integer getContactType() {
+		return contactType;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_follow.contact_information
-	 * @param contactInformation  the value for user_follow.contact_information
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_follow.contact_type
+	 * @param contactType  the value for user_follow.contact_type
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
-	public void setContactInformation(String contactInformation) {
-		this.contactInformation = contactInformation;
+	public void setContactType(Integer contactType) {
+		this.contactType = contactType;
 	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_follow.effective
 	 * @return  the value of user_follow.effective
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Integer getEffective() {
 		return effective;
@@ -239,7 +239,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_follow.effective
 	 * @param effective  the value for user_follow.effective
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setEffective(Integer effective) {
 		this.effective = effective;
@@ -248,7 +248,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_follow.time_stamp
 	 * @return  the value of user_follow.time_stamp
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Date getTimeStamp() {
 		return timeStamp;
@@ -257,7 +257,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_follow.time_stamp
 	 * @param timeStamp  the value for user_follow.time_stamp
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setTimeStamp(Date timeStamp) {
 		this.timeStamp = timeStamp;
@@ -266,7 +266,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_follow.follow_count
 	 * @return  the value of user_follow.follow_count
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Integer getFollowCount() {
 		return followCount;
@@ -275,7 +275,7 @@ public class UserFollow {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_follow.follow_count
 	 * @param followCount  the value for user_follow.follow_count
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setFollowCount(Integer followCount) {
 		this.followCount = followCount;

+ 40 - 50
src/main/java/com/goafanti/common/model/UserFollowExample.java

@@ -7,23 +7,23 @@ import java.util.List;
 public class UserFollowExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public UserFollowExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -31,7 +31,7 @@ public class UserFollowExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -39,7 +39,7 @@ public class UserFollowExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -47,7 +47,7 @@ public class UserFollowExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -55,7 +55,7 @@ public class UserFollowExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -63,7 +63,7 @@ public class UserFollowExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -71,7 +71,7 @@ public class UserFollowExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -79,7 +79,7 @@ public class UserFollowExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -89,7 +89,7 @@ public class UserFollowExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -101,7 +101,7 @@ public class UserFollowExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -110,7 +110,7 @@ public class UserFollowExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -120,7 +120,7 @@ public class UserFollowExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -713,73 +713,63 @@ public class UserFollowExample {
 			return (Criteria) this;
 		}
 
-		public Criteria andContactInformationIsNull() {
-			addCriterion("contact_information is null");
+		public Criteria andContactTypeIsNull() {
+			addCriterion("contact_type is null");
 			return (Criteria) this;
 		}
 
-		public Criteria andContactInformationIsNotNull() {
-			addCriterion("contact_information is not null");
+		public Criteria andContactTypeIsNotNull() {
+			addCriterion("contact_type is not null");
 			return (Criteria) this;
 		}
 
-		public Criteria andContactInformationEqualTo(String value) {
-			addCriterion("contact_information =", value, "contactInformation");
+		public Criteria andContactTypeEqualTo(Integer value) {
+			addCriterion("contact_type =", value, "contactType");
 			return (Criteria) this;
 		}
 
-		public Criteria andContactInformationNotEqualTo(String value) {
-			addCriterion("contact_information <>", value, "contactInformation");
+		public Criteria andContactTypeNotEqualTo(Integer value) {
+			addCriterion("contact_type <>", value, "contactType");
 			return (Criteria) this;
 		}
 
-		public Criteria andContactInformationGreaterThan(String value) {
-			addCriterion("contact_information >", value, "contactInformation");
+		public Criteria andContactTypeGreaterThan(Integer value) {
+			addCriterion("contact_type >", value, "contactType");
 			return (Criteria) this;
 		}
 
-		public Criteria andContactInformationGreaterThanOrEqualTo(String value) {
-			addCriterion("contact_information >=", value, "contactInformation");
+		public Criteria andContactTypeGreaterThanOrEqualTo(Integer value) {
+			addCriterion("contact_type >=", value, "contactType");
 			return (Criteria) this;
 		}
 
-		public Criteria andContactInformationLessThan(String value) {
-			addCriterion("contact_information <", value, "contactInformation");
+		public Criteria andContactTypeLessThan(Integer value) {
+			addCriterion("contact_type <", value, "contactType");
 			return (Criteria) this;
 		}
 
-		public Criteria andContactInformationLessThanOrEqualTo(String value) {
-			addCriterion("contact_information <=", value, "contactInformation");
+		public Criteria andContactTypeLessThanOrEqualTo(Integer value) {
+			addCriterion("contact_type <=", value, "contactType");
 			return (Criteria) this;
 		}
 
-		public Criteria andContactInformationLike(String value) {
-			addCriterion("contact_information like", value, "contactInformation");
+		public Criteria andContactTypeIn(List<Integer> values) {
+			addCriterion("contact_type in", values, "contactType");
 			return (Criteria) this;
 		}
 
-		public Criteria andContactInformationNotLike(String value) {
-			addCriterion("contact_information not like", value, "contactInformation");
+		public Criteria andContactTypeNotIn(List<Integer> values) {
+			addCriterion("contact_type not in", values, "contactType");
 			return (Criteria) this;
 		}
 
-		public Criteria andContactInformationIn(List<String> values) {
-			addCriterion("contact_information in", values, "contactInformation");
+		public Criteria andContactTypeBetween(Integer value1, Integer value2) {
+			addCriterion("contact_type between", value1, value2, "contactType");
 			return (Criteria) this;
 		}
 
-		public Criteria andContactInformationNotIn(List<String> values) {
-			addCriterion("contact_information not in", values, "contactInformation");
-			return (Criteria) this;
-		}
-
-		public Criteria andContactInformationBetween(String value1, String value2) {
-			addCriterion("contact_information between", value1, value2, "contactInformation");
-			return (Criteria) this;
-		}
-
-		public Criteria andContactInformationNotBetween(String value1, String value2) {
-			addCriterion("contact_information not between", value1, value2, "contactInformation");
+		public Criteria andContactTypeNotBetween(Integer value1, Integer value2) {
+			addCriterion("contact_type not between", value1, value2, "contactType");
 			return (Criteria) this;
 		}
 
@@ -966,7 +956,7 @@ public class UserFollowExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table user_follow
-	 * @mbg.generated  Fri Nov 10 19:10:10 CST 2017
+	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017
 	 */
 	public static class Criterion {
 		private String condition;

+ 76 - 0
src/main/java/com/goafanti/customer/bo/BusinessListBo.java

@@ -0,0 +1,76 @@
+package com.goafanti.customer.bo;
+
+public class BusinessListBo {
+	/** 客户业务ID **/
+	private String id;
+	/** 业务字典ID **/
+	private String businessId;
+	/** 业务名称 **/
+	private String businessName;
+	/** 客户名称 **/
+	private String identifyName;
+	/** 跟进进度 **/
+	private String followSituation;
+	/** 客户状态 **/
+	private String customerStatus;
+	/** 营销员名字 **/
+	private String adminName;
+	/** 开始时间 **/
+	private String startDate;
+	/** 结束时间 **/
+	private String endDate;
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getBusinessId() {
+		return businessId;
+	}
+	public void setBusinessId(String businessId) {
+		this.businessId = businessId;
+	}
+	public String getBusinessName() {
+		return businessName;
+	}
+	public void setBusinessName(String businessName) {
+		this.businessName = businessName;
+	}
+	public String getIdentifyName() {
+		return identifyName;
+	}
+	public void setIdentifyName(String identifyName) {
+		this.identifyName = identifyName;
+	}
+	public String getFollowSituation() {
+		return followSituation;
+	}
+	public void setFollowSituation(String followSituation) {
+		this.followSituation = followSituation;
+	}
+	public String getCustomerStatus() {
+		return customerStatus;
+	}
+	public void setCustomerStatus(String customerStatus) {
+		this.customerStatus = customerStatus;
+	}
+	public String getAdminName() {
+		return adminName;
+	}
+	public void setAdminName(String adminName) {
+		this.adminName = adminName;
+	}
+	public String getStartDate() {
+		return startDate;
+	}
+	public void setStartDate(String startDate) {
+		this.startDate = startDate;
+	}
+	public String getEndDate() {
+		return endDate;
+	}
+	public void setEndDate(String endDate) {
+		this.endDate = endDate;
+	}
+}

+ 28 - 0
src/main/java/com/goafanti/customer/bo/BussinessFollowBo.java

@@ -0,0 +1,28 @@
+package com.goafanti.customer.bo;
+
+import com.goafanti.common.model.UserBusiness;
+import com.goafanti.common.model.UserFollow;
+
+public class BussinessFollowBo {
+	private UserFollow userFollow;
+	private UserBusiness userBusiness;
+	private String createTime;
+	public UserFollow getUserFollow() {
+		return userFollow;
+	}
+	public void setUserFollow(UserFollow userFollow) {
+		this.userFollow = userFollow;
+	}
+	public UserBusiness getUserBusiness() {
+		return userBusiness;
+	}
+	public void setUserBusiness(UserBusiness userBusiness) {
+		this.userBusiness = userBusiness;
+	}
+	public String getCreateTime() {
+		return createTime;
+	}
+	public void setCreateTime(String createTime) {
+		this.createTime = createTime;
+	}	
+}

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

@@ -41,7 +41,7 @@ public class CustomerListIn {
 	/** 实名认证 0-未认证  1-已认证 **/
 	private String userCertification;
 	
-	/** 当前会员状态 0-普通用户 1-会员 2-会员过期 **/
+	/** 当前会员状态 0-正常、1-锁定、2-过期  **/
 	private String currentMemberStatus;
 	
 	/** 是否国际化 0-否 1-是 **/
@@ -68,6 +68,9 @@ public class CustomerListIn {
 	/** 是否属于高新 **/
 	private String highTechZone;
 	
+	/** 是否会员 **/
+	private String isMember;
+	
 	public String getType() {
 		return type;
 	}
@@ -244,4 +247,11 @@ public class CustomerListIn {
 		this.highTechZone = highTechZone;
 	}
 
+	public String getIsMember() {
+		return isMember;
+	}
+
+	public void setIsMember(String isMember) {
+		this.isMember = isMember;
+	}
 }

+ 27 - 0
src/main/java/com/goafanti/customer/bo/CustomerOrganizationDetailBo.java

@@ -0,0 +1,27 @@
+package com.goafanti.customer.bo;
+
+import com.goafanti.common.model.OrganizationIdentity;
+
+public class CustomerOrganizationDetailBo extends OrganizationIdentity{
+	private String societyTag;
+	private String companyLogoUrl;
+	private String introduction;
+	public String getSocietyTag() {
+		return societyTag;
+	}
+	public void setSocietyTag(String societyTag) {
+		this.societyTag = societyTag;
+	}
+	public String getCompanyLogoUrl() {
+		return companyLogoUrl;
+	}
+	public void setCompanyLogoUrl(String companyLogoUrl) {
+		this.companyLogoUrl = companyLogoUrl;
+	}
+	public String getIntroduction() {
+		return introduction;
+	}
+	public void setIntroduction(String introduction) {
+		this.introduction = introduction;
+	}
+}

+ 7 - 0
src/main/java/com/goafanti/customer/bo/CustomerPersonalDetailBo.java

@@ -0,0 +1,7 @@
+package com.goafanti.customer.bo;
+
+import com.goafanti.common.model.UserIdentity;
+
+public class CustomerPersonalDetailBo extends UserIdentity{
+	
+}

+ 49 - 0
src/main/java/com/goafanti/customer/controller/BusinessApiController.java

@@ -0,0 +1,49 @@
+package com.goafanti.customer.controller;
+
+import javax.annotation.Resource;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.common.bo.Error;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.controller.BaseController;
+import com.goafanti.customer.bo.BusinessListBo;
+import com.goafanti.customer.bo.BussinessFollowBo;
+import com.goafanti.customer.service.BusinessService;
+
+@RestController
+@RequestMapping("api/admin/customer")
+public class BusinessApiController extends BaseController{
+	@Resource
+	private BusinessService businessService;
+	
+	/** 查询业务列表 **/
+	@RequestMapping(value = "/listBusiness", method = RequestMethod.POST)
+	public Result listBusiness(BusinessListBo blo,Integer pageNo, Integer pageSize){
+		Result res = new Result();
+		res.setData(businessService.listBusiness(blo, pageNo, pageSize));
+		return res;
+	}
+	/** 查询业务字典 **/
+	@RequestMapping(value = "/findBusinessGlossory",method = RequestMethod.GET)
+	public Result findBusinessGlossory(){
+		Result res = new Result();
+		res.setData(businessService.findBusinessGlossory());
+		return res;
+	}
+
+	/** 添加意向和拜访记录 **/
+	@RequestMapping(value = "/addBusinessAndFollow", method = RequestMethod.POST)
+	public Result addBusinessAndFollow(BussinessFollowBo bfb){
+		Result res = new Result();
+		if(businessService.judgeBusiness(bfb.getUserBusiness().getUid(), bfb.getUserBusiness().getBusinessGlossoryId())>0){
+			res.getError().add(new Error("该项业务已经被跟进"));
+			return res;
+		}
+		businessService.addBusinessAndFollow(bfb);
+		return res;
+	}
+
+}

+ 33 - 1
src/main/java/com/goafanti/customer/controller/CustomerController.java

@@ -6,14 +6,18 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
+import com.goafanti.common.bo.Error;
 import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseController;
+import com.goafanti.common.utils.StringUtils;
 import com.goafanti.customer.bo.CustomerListIn;
+import com.goafanti.customer.bo.CustomerOrganizationDetailBo;
 import com.goafanti.customer.service.CustomerService;
 
 @RestController
 @RequestMapping("api/admin/customer")
-public class CustomerController extends BaseController{
+public class CustomerApiController extends BaseController{
 	@Resource
 	private CustomerService customerService;
 	
@@ -81,4 +85,32 @@ public class CustomerController extends BaseController{
 		customerService.addCustomer(name, contacts, contactMobile, Integer.parseInt(type));
 		return res;
 	}
+	
+	/** 个人客户详情信息 **/
+	@RequestMapping(value = "/findPersonalCustomerDetail" ,method = RequestMethod.GET)
+	public Result findPersonalCustomerDetail(String uid){
+		Result res = new Result();
+		res.setData(customerService.findPersonalCustomerDetail(uid));
+		return res;
+	}
+	
+	/** 单位客户详情信息 **/
+	@RequestMapping(value = "/findOrganizationCustomerDetail", method = RequestMethod.GET)
+	public Result findOrganizationCustomerDetail(String uid){
+		Result res = new Result();
+		res.setData(customerService.findOrganizationCustomerDetail(uid));
+		return res;
+	}
+	
+	/** 修改单位客户信息 **/
+	@RequestMapping(value = "/updateOrganizationCustomer", method = RequestMethod.POST)
+	public Result updateOrganizationCustomer(CustomerOrganizationDetailBo bo){
+		Result res = new Result();
+		if(StringUtils.isBlank(bo.getId()) || StringUtils.isBlank(bo.getUid())){
+			res.getError().add(new Error(ErrorConstants.PARAM_ERROR));
+			return res;
+		} 
+		customerService.updateOrganizationCustomer(bo);
+		return res;
+	}
 }

+ 36 - 0
src/main/java/com/goafanti/customer/service/BusinessService.java

@@ -0,0 +1,36 @@
+package com.goafanti.customer.service;
+
+import java.util.List;
+
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.customer.bo.BusinessListBo;
+import com.goafanti.customer.bo.BussinessFollowBo;
+
+public interface BusinessService {
+	/**
+	 * 查询服务列表
+	 * @param blo
+	 * @return
+	 */
+	Pagination<BusinessListBo> listBusiness(BusinessListBo blo,Integer pageNo,Integer pageSize);
+
+	/**
+	 *  意向字典
+	 * @return
+	 */
+	List<BusinessListBo> findBusinessGlossory();
+	
+	/**
+	 * 
+	 * @param uid 客户ID
+	 * @param businessGlossoryId 业务意向字典ID 
+	 * @return
+	 */
+	int judgeBusiness(String uid,Integer businessGlossoryId);
+
+	/**
+	 * 添加意向服务和跟进记录
+	 * @param bfb
+	 */
+	void addBusinessAndFollow(BussinessFollowBo bfb);
+}

+ 35 - 13
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -5,6 +5,8 @@ import java.util.List;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.customer.bo.CustomerListIn;
 import com.goafanti.customer.bo.CustomerListOut;
+import com.goafanti.customer.bo.CustomerOrganizationDetailBo;
+import com.goafanti.customer.bo.CustomerPersonalDetailBo;
 import com.goafanti.customer.bo.CustomerSimpleBo;
 
 public interface CustomerService {
@@ -16,7 +18,7 @@ public interface CustomerService {
 	 * @return
 	 */
 	
-	public Pagination<CustomerListOut> listPrivatePersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
+	Pagination<CustomerListOut> listPrivatePersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
 	/**
 	 * 公共个人客户列表查询
 	 * @param cin
@@ -24,7 +26,7 @@ public interface CustomerService {
 	 * @param pageNumber
 	 * @return
 	 */
-	public Pagination<CustomerListOut> listPublicPersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
+	Pagination<CustomerListOut> listPublicPersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
 	
 	
 	/**
@@ -34,7 +36,7 @@ public interface CustomerService {
 	 * @param pageNumber
 	 * @return
 	 */
-	public Pagination<CustomerListOut> listAllPersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
+	Pagination<CustomerListOut> listAllPersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
 	
 	/**
 	 * 私有单位客户列表查询
@@ -43,7 +45,7 @@ public interface CustomerService {
 	 * @param pageNumber
 	 * @return
 	 */
-	public Pagination<CustomerListOut> listPrivateOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
+	Pagination<CustomerListOut> listPrivateOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
 	
 	/**
 	 * 公共单位客户列表查询
@@ -52,7 +54,7 @@ public interface CustomerService {
 	 * @param pageNumber
 	 * @return
 	 */
-	public Pagination<CustomerListOut> listPublicOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
+	Pagination<CustomerListOut> listPublicOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
 	
 	
 	/**
@@ -62,23 +64,21 @@ public interface CustomerService {
 	 * @param pageNumber
 	 * @return
 	 */
-	public Pagination<CustomerListOut> listAllOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
-	
-	
-	
+	Pagination<CustomerListOut> listAllOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
+
 	/**
 	 * 使用客户名检索客户
 	 * @param name 客户名称
 	 * @return
 	 */
-	public List<CustomerSimpleBo> findCustomerByName(String name);
+	List<CustomerSimpleBo> findCustomerByName(String name);
 	
 	/**
 	 * 判断是否存在某个单位客户
 	 * @param name
 	 * @return
 	 */
-	public int judgeCustomerByName(String name);
+	int judgeCustomerByName(String name);
 	
 	/**
 	 * 
@@ -88,6 +88,28 @@ public interface CustomerService {
 	 * @param type 客户类型
 	 * @return
 	 */
-	public int addCustomer(String name,String contacts,String contactMobile,Integer type);
-
+	int addCustomer(String name,String contacts,String contactMobile,Integer type);
+	
+	
+	/**
+	 * 查询单位客户详情
+	 * @param uid 用户ID
+	 * @return
+	 */
+	CustomerPersonalDetailBo findPersonalCustomerDetail(String uid);
+	
+	
+	/**
+	 * 查询单位客户详情
+	 * @param uid 用户ID
+	 * @return
+	 */
+	CustomerOrganizationDetailBo findOrganizationCustomerDetail(String uid);
+	
+	/**
+	 * 修改单位客户信息
+	 * @param bo
+	 * @return
+	 */
+	int updateOrganizationCustomer(CustomerOrganizationDetailBo bo);
 }

+ 94 - 0
src/main/java/com/goafanti/customer/service/impl/BusinessServiceImpl.java

@@ -0,0 +1,94 @@
+package com.goafanti.customer.service.impl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.commons.beanutils.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.dao.UserBusinessMapper;
+import com.goafanti.common.dao.UserFollowBusinessMapper;
+import com.goafanti.common.dao.UserFollowMapper;
+import com.goafanti.common.model.UserBusiness;
+import com.goafanti.common.model.UserFollow;
+import com.goafanti.common.model.UserFollowBusiness;
+import com.goafanti.common.utils.StringUtils;
+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.BusinessListBo;
+import com.goafanti.customer.bo.BussinessFollowBo;
+import com.goafanti.customer.service.BusinessService;
+
+@Service
+public class BusinessServiceImpl extends BaseMybatisDao<UserBusinessMapper> implements BusinessService {
+	@Autowired
+	private UserBusinessMapper userBusinessMapper;
+	@Autowired
+	private UserFollowMapper userFollowMapper;
+	@Autowired
+	private UserFollowBusinessMapper userFollowBusinessMapper;
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<BusinessListBo> listBusiness(BusinessListBo blo,Integer pageNo,Integer pageSize) {
+		return (Pagination<BusinessListBo>) findPage("selectBusinessList", "selectBusinessCount", disposeParams(blo), pageNo, pageSize);
+	}
+	
+	private Map<String,Object> disposeParams(BusinessListBo blo){
+		Map<String, Object> params = new HashMap<String, Object>();
+		if(StringUtils.isNotBlank(blo.getAdminName())) params.put("adminName", blo.getAdminName());
+		if(StringUtils.isNotBlank(blo.getBusinessId())) params.put("businessId", blo.getBusinessId());
+		if(StringUtils.isNotBlank(blo.getStartDate())) params.put("startDate", blo.getStartDate()+" 00:00:00");
+		if(StringUtils.isNotBlank(blo.getEndDate())) params.put("endDate", blo.getEndDate()+ " 23:59:59");
+		if(StringUtils.isNotBlank(blo.getIdentifyName())) params.put("identity", blo.getIdentifyName());
+		if(StringUtils.isNoneBlank(blo.getFollowSituation())) params.put("followSituation", blo.getFollowSituation());
+		if(StringUtils.isNotBlank(blo.getCustomerStatus())) params.put("customerStatus", blo.getCustomerStatus());
+		return params;
+	}
+
+	@Override
+	public List<BusinessListBo> findBusinessGlossory() {
+		return userBusinessMapper.findBusinessGlossory();
+	}
+
+	@Override
+	public int judgeBusiness(String uid, Integer businessGlossoryId) {
+		
+		return userBusinessMapper.judgeBusiness(uid,businessGlossoryId,"");
+	}
+
+	@Override
+	public void addBusinessAndFollow(BussinessFollowBo bfb) {
+		UserBusiness ub = new UserBusiness();
+		String ubId = UUID.randomUUID().toString();
+		try {
+			BeanUtils.copyProperties(ub, bfb.getUserBusiness());
+			ub.setId(ubId);
+			ub.setAid(TokenManager.getAdminId());
+			userBusinessMapper.insert(ub);
+			if(StringUtils.isNotBlank(bfb.getUserFollow().getOcbId())){ //跟进联系人不为空则添加跟进记录
+				UserFollow uf = new UserFollow();
+				String ufId = UUID.randomUUID().toString();
+				BeanUtils.copyProperties(uf, bfb);
+				uf.setAid(TokenManager.getAdminId());
+				uf.setEffective(0);
+				int followCount = userBusinessMapper.judgeBusiness(bfb.getUserFollow().getUid(), null, TokenManager.getAdminId())+1;
+				uf.setFollowCount(followCount);
+				userFollowMapper.insert(uf);
+				UserFollowBusiness ufb = new UserFollowBusiness();
+				ufb.setId(UUID.randomUUID().toString());
+				ufb.setBusinessId(ubId);
+				ufb.setFollowId(ufId);
+				ufb.setCustomerStatus(ub.getCustomerStatus());
+				ufb.setFollowSituation(ub.getFollowSituation());
+				userFollowBusinessMapper.insert(ufb);
+			}
+		} catch (IllegalAccessException | InvocationTargetException e) {
+			e.printStackTrace();
+		}
+	}
+}

+ 54 - 10
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -1,11 +1,15 @@
 package com.goafanti.customer.service.impl;
 
+import java.lang.reflect.InvocationTargetException;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
+import javax.annotation.Resource;
+
+import org.apache.commons.beanutils.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -20,12 +24,15 @@ import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.User;
 import com.goafanti.common.model.UserIdentity;
+import com.goafanti.common.utils.PasswordUtil;
 import com.goafanti.common.utils.StringUtils;
 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.CustomerListIn;
 import com.goafanti.customer.bo.CustomerListOut;
+import com.goafanti.customer.bo.CustomerOrganizationDetailBo;
+import com.goafanti.customer.bo.CustomerPersonalDetailBo;
 import com.goafanti.customer.bo.CustomerSimpleBo;
 import com.goafanti.customer.service.CustomerService;
 
@@ -39,6 +46,8 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 	private OrganizationIdentityMapper organizationIdentityMapper;
 	@Autowired
 	private OrganizationContactBookMapper organizationContactBookMapper;
+	@Resource(name = "passwordUtil")
+	private PasswordUtil					passwordUtil;
 	@Override
 	public Pagination<CustomerListOut> listPrivatePersonalCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
 		cli.setType(AFTConstants.USER_TYPE_PERSONAL);
@@ -123,6 +132,7 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 		if(StringUtils.isNotBlank(cli.getListed())) params.put("listed", Integer.parseInt(cli.getListed()));
 		if(StringUtils.isNotBlank(cli.getHighTechZone())) params.put("highTechZone", Integer.parseInt(cli.getHighTechZone()));
 		if(StringUtils.isNotBlank(cli.getAid())) params.put("aid", cli.getAid());
+		if(StringUtils.isNotBlank(cli.getIsMember())) params.put("isMember", Integer.parseInt(cli.getIsMember()));
 		if(StringUtils.isNotBlank(cli.getStartDate())) params.put("startDate", cli.getStartDate()+" 00:00:00");
 		if(StringUtils.isNotBlank(cli.getEndDate())) params.put("endDate", cli.getEndDate()+" 23:59:59");
 		return params;
@@ -161,6 +171,7 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 		user.setUpdateTime(now);
 		user.setMobile(contactMobile);
 		user.setPassword(AFTConstants.INITIALPASSWORD);
+		passwordUtil.encryptPassword(user);
 		if(type == 0){
 			UserIdentity ui = new UserIdentity();
 			ui.setId(identifyId);
@@ -187,18 +198,51 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 			oi.setListed(0);
 			oi.setAuditStatus(0);
 			organizationIdentityMapper.insert(oi);
-			//新增企业联系人
-			OrganizationContactBook cob = new OrganizationContactBook();
-			cob.setAid(TokenManager.getAdminId());
-			cob.setId(UUID.randomUUID().toString());
-			cob.setCid(identifyId);
-			cob.setName(contacts);
-			cob.setMobile(contactMobile);
-			organizationContactBookMapper.insert(cob);
 		}
-		userMapper.insert(user);
+		userMapper.insert(user);	
+		//新增企业联系人
+		OrganizationContactBook cob = new OrganizationContactBook();
+		cob.setAid(TokenManager.getAdminId());
+		cob.setId(UUID.randomUUID().toString());
+		cob.setCid(identifyId);
+		cob.setName(contacts);
+		cob.setMobile(contactMobile);
+		organizationContactBookMapper.insert(cob);
+		return 1;
+	}
+
+	@Override
+	public CustomerPersonalDetailBo findPersonalCustomerDetail(String uid) {
+		return userMapper.findPersonalCustomerDetail(uid);
+	}
+
+	@Override
+	public CustomerOrganizationDetailBo findOrganizationCustomerDetail(String uid) {
 		
-		return 0;
+		return userMapper.findOrganizationCustomerDetail(uid);
+	}
+
+	@Override
+	@Transactional
+	public int updateOrganizationCustomer(CustomerOrganizationDetailBo bo) {
+		OrganizationIdentity oi = new OrganizationIdentity();
+		User user = new User();
+		try {
+			BeanUtils.copyProperties(oi, bo);
+			user.setId(bo.getUid());
+			user.setIdentifyName(bo.getUnitName());
+			user.setSocietyTag(bo.getSocietyTag());
+			user.setCompanyLogoUrl(bo.getCompanyLogoUrl());
+			user.setIntroduction(bo.getIntroduction());
+			user.setUpdateTime(new Date());
+		} catch (IllegalAccessException e) {
+			e.printStackTrace();
+		} catch (InvocationTargetException e) {
+			e.printStackTrace();
+		}
+		organizationIdentityMapper.updateByPrimaryKeySelective(oi);
+		userMapper.updateByPrimaryKeySelective(user);
+		return 1;
 	}
 	
 }