Bladeren bron

Merge remote-tracking branch 'origin/test'

ender 8 jaren geleden
bovenliggende
commit
9cbb5fb8f8
32 gewijzigde bestanden met toevoegingen van 1786 en 510 verwijderingen
  1. 11 11
      src/main/java/com/goafanti/common/dao/OrganizationContactBookMapper.java
  2. 8 0
      src/main/java/com/goafanti/common/dao/UserBusinessMapper.java
  3. 11 11
      src/main/java/com/goafanti/common/dao/UserFollowMapper.java
  4. 54 11
      src/main/java/com/goafanti/common/dao/UserMapper.java
  5. 29 29
      src/main/java/com/goafanti/common/mapper/OrganizationContactBookMapper.xml
  6. 91 0
      src/main/java/com/goafanti/common/mapper/UserBusinessMapper.xml
  7. 30 30
      src/main/java/com/goafanti/common/mapper/UserFollowMapper.xml
  8. 35 20
      src/main/java/com/goafanti/common/mapper/UserMapper.xml
  9. 124 6
      src/main/java/com/goafanti/common/mapper/UserMapperExt.xml
  10. 49 49
      src/main/java/com/goafanti/common/model/OrganizationContactBook.java
  11. 44 44
      src/main/java/com/goafanti/common/model/OrganizationContactBookExample.java
  12. 101 78
      src/main/java/com/goafanti/common/model/User.java
  13. 76 16
      src/main/java/com/goafanti/common/model/UserExample.java
  14. 46 46
      src/main/java/com/goafanti/common/model/UserFollow.java
  15. 40 50
      src/main/java/com/goafanti/common/model/UserFollowExample.java
  16. 25 0
      src/main/java/com/goafanti/common/utils/BeanUtilsExt.java
  17. 76 0
      src/main/java/com/goafanti/customer/bo/BusinessListBo.java
  18. 106 0
      src/main/java/com/goafanti/customer/bo/BussinessFollowBo.java
  19. 11 1
      src/main/java/com/goafanti/customer/bo/CustomerListIn.java
  20. 1 1
      src/main/java/com/goafanti/customer/bo/CustomerListOut.java
  21. 27 0
      src/main/java/com/goafanti/customer/bo/CustomerOrganizationDetailBo.java
  22. 7 0
      src/main/java/com/goafanti/customer/bo/CustomerPersonalDetailBo.java
  23. 85 0
      src/main/java/com/goafanti/customer/bo/FollowBusinessBo.java
  24. 67 0
      src/main/java/com/goafanti/customer/bo/FollowListBo.java
  25. 16 0
      src/main/java/com/goafanti/customer/bo/UserDetailBo.java
  26. 73 0
      src/main/java/com/goafanti/customer/controller/BusinessApiController.java
  27. 192 0
      src/main/java/com/goafanti/customer/controller/CustomerApiController.java
  28. 0 84
      src/main/java/com/goafanti/customer/controller/CustomerController.java
  29. 45 0
      src/main/java/com/goafanti/customer/service/BusinessService.java
  30. 73 13
      src/main/java/com/goafanti/customer/service/CustomerService.java
  31. 110 0
      src/main/java/com/goafanti/customer/service/impl/BusinessServiceImpl.java
  32. 123 10
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

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

@@ -11,69 +11,69 @@ public interface OrganizationContactBookMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	long countByExample(OrganizationContactBookExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	int deleteByExample(OrganizationContactBookExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	int deleteByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	int insert(OrganizationContactBook record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	int insertSelective(OrganizationContactBook record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	List<OrganizationContactBook> selectByExample(OrganizationContactBookExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	OrganizationContactBook selectByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	int updateByExampleSelective(@Param("record") OrganizationContactBook record,
 			@Param("example") OrganizationContactBookExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	int updateByExample(@Param("record") OrganizationContactBook record,
 			@Param("example") OrganizationContactBookExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	int updateByPrimaryKeySelective(OrganizationContactBook record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	int updateByPrimaryKey(OrganizationContactBook record);
 }

+ 8 - 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,10 @@ 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);
+
+	List<UserBusiness> findBusinessByUAid(String uid, 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);
 }

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

@@ -5,78 +5,81 @@ import java.util.List;
 
 import org.apache.ibatis.annotations.Param;
 
+import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.User;
 import com.goafanti.user.bo.OrgPartnerDetailBo;
 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 +103,47 @@ 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);
+
+	/**
+	 * 查看客户账户信息
+	 * @param uid
+	 * @return
+	 */
+	User findUserAccountDetail(@Param("uid")String uid);
+
+	/**
+	 * 查看客户联系人列表
+	 * @param uid
+	 * @return
+	 */
+	List<OrganizationContactBook> findCustomerContacts(@Param("uid")String uid,@Param("aid")String aid);
+
 }

+ 29 - 29
src/main/java/com/goafanti/common/mapper/OrganizationContactBookMapper.xml

@@ -5,10 +5,10 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Nov 13 11:47:55 CST 2017.
+      This element was generated on Wed Nov 15 16:01:22 CST 2017.
     -->
     <id column="id" jdbcType="VARCHAR" property="id" />
-    <result column="cid" jdbcType="VARCHAR" property="cid" />
+    <result column="uid" jdbcType="VARCHAR" property="uid" />
     <result column="name" jdbcType="VARCHAR" property="name" />
     <result column="sex" jdbcType="CHAR" property="sex" />
     <result column="mobile" jdbcType="VARCHAR" property="mobile" />
@@ -25,7 +25,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Nov 13 11:47:55 CST 2017.
+      This element was generated on Wed Nov 15 16:01:22 CST 2017.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -59,7 +59,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Nov 13 11:47:55 CST 2017.
+      This element was generated on Wed Nov 15 16:01:22 CST 2017.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -93,16 +93,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Nov 13 11:47:55 CST 2017.
+      This element was generated on Wed Nov 15 16:01:22 CST 2017.
     -->
-    id, cid, name, sex, mobile, email, qq, wechat, depatrment, customer_position, tel_num, 
+    id, uid, name, sex, mobile, email, qq, wechat, depatrment, customer_position, tel_num, 
     major, aid
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.OrganizationContactBookExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Nov 13 11:47:55 CST 2017.
+      This element was generated on Wed Nov 15 16:01:22 CST 2017.
     -->
     select
     <if test="distinct">
@@ -121,7 +121,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Nov 13 11:47:55 CST 2017.
+      This element was generated on Wed Nov 15 16:01:22 CST 2017.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -132,7 +132,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Nov 13 11:47:55 CST 2017.
+      This element was generated on Wed Nov 15 16:01:22 CST 2017.
     -->
     delete from organization_contact_book
     where id = #{id,jdbcType=VARCHAR}
@@ -141,7 +141,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Nov 13 11:47:55 CST 2017.
+      This element was generated on Wed Nov 15 16:01:22 CST 2017.
     -->
     delete from organization_contact_book
     <if test="_parameter != null">
@@ -152,13 +152,13 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Nov 13 11:47:55 CST 2017.
+      This element was generated on Wed Nov 15 16:01:22 CST 2017.
     -->
-    insert into organization_contact_book (id, cid, name, 
+    insert into organization_contact_book (id, uid, name, 
       sex, mobile, email, qq, 
       wechat, depatrment, customer_position, 
       tel_num, major, aid)
-    values (#{id,jdbcType=VARCHAR}, #{cid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
+    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
       #{sex,jdbcType=CHAR}, #{mobile,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, 
       #{wechat,jdbcType=VARCHAR}, #{depatrment,jdbcType=VARCHAR}, #{customerPosition,jdbcType=VARCHAR}, 
       #{telNum,jdbcType=VARCHAR}, #{major,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR})
@@ -167,15 +167,15 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Nov 13 11:47:55 CST 2017.
+      This element was generated on Wed Nov 15 16:01:22 CST 2017.
     -->
     insert into organization_contact_book
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
         id,
       </if>
-      <if test="cid != null">
-        cid,
+      <if test="uid != null">
+        uid,
       </if>
       <if test="name != null">
         name,
@@ -215,8 +215,8 @@
       <if test="id != null">
         #{id,jdbcType=VARCHAR},
       </if>
-      <if test="cid != null">
-        #{cid,jdbcType=VARCHAR},
+      <if test="uid != null">
+        #{uid,jdbcType=VARCHAR},
       </if>
       <if test="name != null">
         #{name,jdbcType=VARCHAR},
@@ -257,7 +257,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Nov 13 11:47:55 CST 2017.
+      This element was generated on Wed Nov 15 16:01:22 CST 2017.
     -->
     select count(*) from organization_contact_book
     <if test="_parameter != null">
@@ -268,15 +268,15 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Nov 13 11:47:55 CST 2017.
+      This element was generated on Wed Nov 15 16:01:22 CST 2017.
     -->
     update organization_contact_book
     <set>
       <if test="record.id != null">
         id = #{record.id,jdbcType=VARCHAR},
       </if>
-      <if test="record.cid != null">
-        cid = #{record.cid,jdbcType=VARCHAR},
+      <if test="record.uid != null">
+        uid = #{record.uid,jdbcType=VARCHAR},
       </if>
       <if test="record.name != null">
         name = #{record.name,jdbcType=VARCHAR},
@@ -320,11 +320,11 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Nov 13 11:47:55 CST 2017.
+      This element was generated on Wed Nov 15 16:01:22 CST 2017.
     -->
     update organization_contact_book
     set id = #{record.id,jdbcType=VARCHAR},
-      cid = #{record.cid,jdbcType=VARCHAR},
+      uid = #{record.uid,jdbcType=VARCHAR},
       name = #{record.name,jdbcType=VARCHAR},
       sex = #{record.sex,jdbcType=CHAR},
       mobile = #{record.mobile,jdbcType=VARCHAR},
@@ -344,12 +344,12 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Nov 13 11:47:55 CST 2017.
+      This element was generated on Wed Nov 15 16:01:22 CST 2017.
     -->
     update organization_contact_book
     <set>
-      <if test="cid != null">
-        cid = #{cid,jdbcType=VARCHAR},
+      <if test="uid != null">
+        uid = #{uid,jdbcType=VARCHAR},
       </if>
       <if test="name != null">
         name = #{name,jdbcType=VARCHAR},
@@ -391,10 +391,10 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Nov 13 11:47:55 CST 2017.
+      This element was generated on Wed Nov 15 16:01:22 CST 2017.
     -->
     update organization_contact_book
-    set cid = #{cid,jdbcType=VARCHAR},
+    set uid = #{uid,jdbcType=VARCHAR},
       name = #{name,jdbcType=VARCHAR},
       sex = #{sex,jdbcType=CHAR},
       mobile = #{mobile,jdbcType=VARCHAR},

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

@@ -348,4 +348,95 @@
       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>
+  
+  <select id="findBusinessByUAid"  parameterType="java.lang.String" resultMap="BaseResultMap">
+  	select select id,uid,business_glossory_id,follow_situation,customer_status,remarks from user_business
+  	where  uid = #{uid,jdbcType=VARCHAR} and aid = #{aid,jdbcType=VARCHAR}
+  </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>
  

+ 124 - 6
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -6,13 +6,12 @@
 		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,
-		b.contacts,b.contact_mobile as
-		contactMobile,b.international,b.expert,b.celebrity,
+		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
 		from
 		(select
-		id,type,status,create_time,service_certification,user_certification,current_member_status,identify_name,lvl
+		id,type,status,create_time,service_certification,user_certification,current_member_status,identify_name,lvl,is_member
 		from user
 		where type = 0
 		<if test="aid != null and aid !=''">
@@ -33,6 +32,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 +68,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 +99,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,12 +138,12 @@
 		%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
 		(select
-		id,type,status,create_time,service_certification,user_certification,current_member_status,identify_name,lvl
+		id,type,status,create_time,service_certification,user_certification,current_member_status,identify_name,lvl,is_member
 		from user
 		where type = 1
 		<if test="aid != null and aid !=''">
@@ -155,6 +164,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 +200,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 +231,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 +273,103 @@
 	<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.international,
+			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>
+	<select id="selectFollowHistoryList" resultType="com.goafanti.customer.bo.FollowListBo">
+		select 
+			a.id as followId,
+			a.create_time as followTime,
+			a.contact_type as contactType,
+			a.result, 
+			b.identify_name as identityName,
+			c.name,
+			c.mobile,
+			d.name as adminName 
+		from user_follow a
+		left join user b on a.uid = b.id 
+		left join organization_contact_book c on a.ocb_id = c.id
+		left join admin d on a.aid = d.id
+		<if test="uid != null and uid != ''">
+			a.uid = #{uid,jdbcType=VARCHAR}
+		</if>
+		<if test="aid != null and aid != ''">
+			a.aid = #{adid,jdbcType=VARCHAR}
+		</if>
+		<if test="page_sql != null">
+    		${page_sql}
+   		 </if>
+	</select>
+	<select id="selectFollowHistoryCount">
+		select 
+			count(0)
+		from user_follow a
+		left join user b on a.uid = b.id 
+		left join organization_contact_book c on a.ocb_id = c.id
+		left join admin d on a.aid = d.id
+		<if test="uid != null and uid != ''">
+			a.uid = #{uid,jdbcType=VARCHAR}
+		</if>
+		<if test="aid != null and aid != ''">
+			a.aid = #{adid,jdbcType=VARCHAR}
+		</if>
+	</select>
+	
+	<select id="findUserAccountDetail"  parameterType="java.lang.String"  resultType="com.goafanti.common.model.User">
+		select
+			id,
+			mobile,
+			nickname,
+			create_time as createTime,
+			type,
+			source,
+			email,
+			is_member as isMember,
+			lvl,
+			current_member_status currentMemberStatus,
+			service_certification as  serviceCertification,
+			user_certification as userCertification,
+			identify_name as identifyName
+		from
+			user
+		where id = #{uid,jdbcType=VARCHAR}
+	</select>
+	
+	<select id="findCustomerContacts" parameterType="java.lang.String" resultType="com.goafanti.common.model.OrganizationContactBook">
+		select id as ocbId,name from organization_contact_book 
+		where uid = #{uid,jdbcType=VARCHAR} and aid = #{aid,jdbcType=VARCHAR}
+	</select>
+		
 </mapper>

+ 49 - 49
src/main/java/com/goafanti/common/model/OrganizationContactBook.java

@@ -4,74 +4,74 @@ public class OrganizationContactBook {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column organization_contact_book.id
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	private String id;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column organization_contact_book.cid
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column organization_contact_book.uid
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
-	private String cid;
+	private String uid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column organization_contact_book.name
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	private String name;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column organization_contact_book.sex
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	private String sex;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column organization_contact_book.mobile
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	private String mobile;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column organization_contact_book.email
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	private String email;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column organization_contact_book.qq
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	private String qq;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column organization_contact_book.wechat
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	private String wechat;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column organization_contact_book.depatrment
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	private String depatrment;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column organization_contact_book.customer_position
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	private String customerPosition;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column organization_contact_book.tel_num
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	private String telNum;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column organization_contact_book.major
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	private Integer major;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column organization_contact_book.aid
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	private String aid;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column organization_contact_book.id
 	 * @return  the value of organization_contact_book.id
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public String getId() {
 		return id;
@@ -80,34 +80,34 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column organization_contact_book.id
 	 * @param id  the value for organization_contact_book.id
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public void setId(String id) {
 		this.id = id;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column organization_contact_book.cid
-	 * @return  the value of organization_contact_book.cid
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column organization_contact_book.uid
+	 * @return  the value of organization_contact_book.uid
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
-	public String getCid() {
-		return cid;
+	public String getUid() {
+		return uid;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column organization_contact_book.cid
-	 * @param cid  the value for organization_contact_book.cid
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column organization_contact_book.uid
+	 * @param uid  the value for organization_contact_book.uid
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
-	public void setCid(String cid) {
-		this.cid = cid;
+	public void setUid(String uid) {
+		this.uid = uid;
 	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column organization_contact_book.name
 	 * @return  the value of organization_contact_book.name
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public String getName() {
 		return name;
@@ -116,7 +116,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column organization_contact_book.name
 	 * @param name  the value for organization_contact_book.name
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public void setName(String name) {
 		this.name = name;
@@ -125,7 +125,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column organization_contact_book.sex
 	 * @return  the value of organization_contact_book.sex
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public String getSex() {
 		return sex;
@@ -134,7 +134,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column organization_contact_book.sex
 	 * @param sex  the value for organization_contact_book.sex
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public void setSex(String sex) {
 		this.sex = sex;
@@ -143,7 +143,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column organization_contact_book.mobile
 	 * @return  the value of organization_contact_book.mobile
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public String getMobile() {
 		return mobile;
@@ -152,7 +152,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column organization_contact_book.mobile
 	 * @param mobile  the value for organization_contact_book.mobile
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public void setMobile(String mobile) {
 		this.mobile = mobile;
@@ -161,7 +161,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column organization_contact_book.email
 	 * @return  the value of organization_contact_book.email
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public String getEmail() {
 		return email;
@@ -170,7 +170,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column organization_contact_book.email
 	 * @param email  the value for organization_contact_book.email
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public void setEmail(String email) {
 		this.email = email;
@@ -179,7 +179,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column organization_contact_book.qq
 	 * @return  the value of organization_contact_book.qq
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public String getQq() {
 		return qq;
@@ -188,7 +188,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column organization_contact_book.qq
 	 * @param qq  the value for organization_contact_book.qq
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public void setQq(String qq) {
 		this.qq = qq;
@@ -197,7 +197,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column organization_contact_book.wechat
 	 * @return  the value of organization_contact_book.wechat
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public String getWechat() {
 		return wechat;
@@ -206,7 +206,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column organization_contact_book.wechat
 	 * @param wechat  the value for organization_contact_book.wechat
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public void setWechat(String wechat) {
 		this.wechat = wechat;
@@ -215,7 +215,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column organization_contact_book.depatrment
 	 * @return  the value of organization_contact_book.depatrment
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public String getDepatrment() {
 		return depatrment;
@@ -224,7 +224,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column organization_contact_book.depatrment
 	 * @param depatrment  the value for organization_contact_book.depatrment
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public void setDepatrment(String depatrment) {
 		this.depatrment = depatrment;
@@ -233,7 +233,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column organization_contact_book.customer_position
 	 * @return  the value of organization_contact_book.customer_position
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public String getCustomerPosition() {
 		return customerPosition;
@@ -242,7 +242,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column organization_contact_book.customer_position
 	 * @param customerPosition  the value for organization_contact_book.customer_position
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public void setCustomerPosition(String customerPosition) {
 		this.customerPosition = customerPosition;
@@ -251,7 +251,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column organization_contact_book.tel_num
 	 * @return  the value of organization_contact_book.tel_num
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public String getTelNum() {
 		return telNum;
@@ -260,7 +260,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column organization_contact_book.tel_num
 	 * @param telNum  the value for organization_contact_book.tel_num
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public void setTelNum(String telNum) {
 		this.telNum = telNum;
@@ -269,7 +269,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column organization_contact_book.major
 	 * @return  the value of organization_contact_book.major
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public Integer getMajor() {
 		return major;
@@ -278,7 +278,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column organization_contact_book.major
 	 * @param major  the value for organization_contact_book.major
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public void setMajor(Integer major) {
 		this.major = major;
@@ -287,7 +287,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column organization_contact_book.aid
 	 * @return  the value of organization_contact_book.aid
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public String getAid() {
 		return aid;
@@ -296,7 +296,7 @@ public class OrganizationContactBook {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column organization_contact_book.aid
 	 * @param aid  the value for organization_contact_book.aid
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public void setAid(String aid) {
 		this.aid = aid;

+ 44 - 44
src/main/java/com/goafanti/common/model/OrganizationContactBookExample.java

@@ -6,23 +6,23 @@ import java.util.List;
 public class OrganizationContactBookExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public OrganizationContactBookExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -30,7 +30,7 @@ public class OrganizationContactBookExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -38,7 +38,7 @@ public class OrganizationContactBookExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -46,7 +46,7 @@ public class OrganizationContactBookExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -54,7 +54,7 @@ public class OrganizationContactBookExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -62,7 +62,7 @@ public class OrganizationContactBookExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -70,7 +70,7 @@ public class OrganizationContactBookExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -78,7 +78,7 @@ public class OrganizationContactBookExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -88,7 +88,7 @@ public class OrganizationContactBookExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -100,7 +100,7 @@ public class OrganizationContactBookExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -109,7 +109,7 @@ public class OrganizationContactBookExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -119,7 +119,7 @@ public class OrganizationContactBookExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -232,73 +232,73 @@ public class OrganizationContactBookExample {
 			return (Criteria) this;
 		}
 
-		public Criteria andCidIsNull() {
-			addCriterion("cid is null");
+		public Criteria andUidIsNull() {
+			addCriterion("uid is null");
 			return (Criteria) this;
 		}
 
-		public Criteria andCidIsNotNull() {
-			addCriterion("cid is not null");
+		public Criteria andUidIsNotNull() {
+			addCriterion("uid is not null");
 			return (Criteria) this;
 		}
 
-		public Criteria andCidEqualTo(String value) {
-			addCriterion("cid =", value, "cid");
+		public Criteria andUidEqualTo(String value) {
+			addCriterion("uid =", value, "uid");
 			return (Criteria) this;
 		}
 
-		public Criteria andCidNotEqualTo(String value) {
-			addCriterion("cid <>", value, "cid");
+		public Criteria andUidNotEqualTo(String value) {
+			addCriterion("uid <>", value, "uid");
 			return (Criteria) this;
 		}
 
-		public Criteria andCidGreaterThan(String value) {
-			addCriterion("cid >", value, "cid");
+		public Criteria andUidGreaterThan(String value) {
+			addCriterion("uid >", value, "uid");
 			return (Criteria) this;
 		}
 
-		public Criteria andCidGreaterThanOrEqualTo(String value) {
-			addCriterion("cid >=", value, "cid");
+		public Criteria andUidGreaterThanOrEqualTo(String value) {
+			addCriterion("uid >=", value, "uid");
 			return (Criteria) this;
 		}
 
-		public Criteria andCidLessThan(String value) {
-			addCriterion("cid <", value, "cid");
+		public Criteria andUidLessThan(String value) {
+			addCriterion("uid <", value, "uid");
 			return (Criteria) this;
 		}
 
-		public Criteria andCidLessThanOrEqualTo(String value) {
-			addCriterion("cid <=", value, "cid");
+		public Criteria andUidLessThanOrEqualTo(String value) {
+			addCriterion("uid <=", value, "uid");
 			return (Criteria) this;
 		}
 
-		public Criteria andCidLike(String value) {
-			addCriterion("cid like", value, "cid");
+		public Criteria andUidLike(String value) {
+			addCriterion("uid like", value, "uid");
 			return (Criteria) this;
 		}
 
-		public Criteria andCidNotLike(String value) {
-			addCriterion("cid not like", value, "cid");
+		public Criteria andUidNotLike(String value) {
+			addCriterion("uid not like", value, "uid");
 			return (Criteria) this;
 		}
 
-		public Criteria andCidIn(List<String> values) {
-			addCriterion("cid in", values, "cid");
+		public Criteria andUidIn(List<String> values) {
+			addCriterion("uid in", values, "uid");
 			return (Criteria) this;
 		}
 
-		public Criteria andCidNotIn(List<String> values) {
-			addCriterion("cid not in", values, "cid");
+		public Criteria andUidNotIn(List<String> values) {
+			addCriterion("uid not in", values, "uid");
 			return (Criteria) this;
 		}
 
-		public Criteria andCidBetween(String value1, String value2) {
-			addCriterion("cid between", value1, value2, "cid");
+		public Criteria andUidBetween(String value1, String value2) {
+			addCriterion("uid between", value1, value2, "uid");
 			return (Criteria) this;
 		}
 
-		public Criteria andCidNotBetween(String value1, String value2) {
-			addCriterion("cid not between", value1, value2, "cid");
+		public Criteria andUidNotBetween(String value1, String value2) {
+			addCriterion("uid not between", value1, value2, "uid");
 			return (Criteria) this;
 		}
 
@@ -1065,7 +1065,7 @@ public class OrganizationContactBookExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table organization_contact_book
-	 * @mbg.generated  Mon Nov 13 11:47:55 CST 2017
+	 * @mbg.generated  Wed Nov 15 16:01:22 CST 2017
 	 */
 	public static class Criterion {
 		private String condition;

+ 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;

+ 25 - 0
src/main/java/com/goafanti/common/utils/BeanUtilsExt.java

@@ -0,0 +1,25 @@
+package com.goafanti.common.utils;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.apache.commons.beanutils.BeanUtils;
+import org.apache.commons.beanutils.ConvertUtils;
+
+public class BeanUtilsExt extends BeanUtils {
+
+    private BeanUtilsExt() {
+    }
+
+    static {
+        ConvertUtils.register(new org.apache.commons.beanutils.converters.DateConverter(null), java.sql.Date.class);
+        ConvertUtils.register(new org.apache.commons.beanutils.converters.SqlDateConverter(null), java.util.Date.class);
+        ConvertUtils.register(new org.apache.commons.beanutils.converters.SqlTimestampConverter(null), java.sql.Timestamp.class);
+        ConvertUtils.register(new org.apache.commons.beanutils.converters.BigDecimalConverter(null) , java.math.BigDecimal.class);
+    }
+
+    public static void copyProperties(Object target, Object source) throws InvocationTargetException,
+            IllegalAccessException {
+        org.apache.commons.beanutils.BeanUtils.copyProperties(target, source);
+
+    }
+}

+ 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;
+	}
+}

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

@@ -0,0 +1,106 @@
+package com.goafanti.customer.bo;
+
+/**
+ * 新增和修改业务意向
+ * @author WangHui
+ *
+ */
+public class BussinessFollowBo {
+	/** 客户ID **/
+	private String uid;
+	/** 客户业务ID **/
+	private String businessId;
+	/** 意向服务ID **/
+	private String businessGlossoryId;
+	/** 跟进状态 **/
+	private String followSituation;
+	/** 客户状态 **/
+	private String customerStatus;
+	/** 创建时间 **/
+	private String createTime;
+	/** 跟进时间 **/
+	private String followTime;
+	/** 营销员ID **/
+	private String adminName;
+	/** 联系方式 **/
+	private String contactType;
+	/** 联系人ID **/
+	private String ocbId;
+	/** 业务意向说明 **/
+	private String remarks;
+	/** 拜访结果 **/
+	private String result;
+	
+	public String getUid() {
+		return uid;
+	}
+	public void setUid(String uid) {
+		this.uid = uid;
+	}
+	public String getBusinessId() {
+		return businessId;
+	}
+	public void setBusinessId(String businessId) {
+		this.businessId = businessId;
+	}
+	public String getBusinessGlossoryId() {
+		return businessGlossoryId;
+	}
+	public void setBusinessGlossoryId(String businessGlossoryId) {
+		this.businessGlossoryId = businessGlossoryId;
+	}
+	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 getCreateTime() {
+		return createTime;
+	}
+	public void setCreateTime(String createTime) {
+		this.createTime = createTime;
+	}
+	public String getFollowTime() {
+		return followTime;
+	}
+	public void setFollowTime(String followTime) {
+		this.followTime = followTime;
+	}
+	public String getAdminName() {
+		return adminName;
+	}
+	public void setAdminName(String adminName) {
+		this.adminName = adminName;
+	}
+	public String getContactType() {
+		return contactType;
+	}
+	public void setContactType(String contactType) {
+		this.contactType = contactType;
+	}
+	public String getOcbId() {
+		return ocbId;
+	}
+	public void setOcbId(String ocbId) {
+		this.ocbId = ocbId;
+	}
+	public String getRemarks() {
+		return remarks;
+	}
+	public void setRemarks(String remarks) {
+		this.remarks = remarks;
+	}
+	public String getResult() {
+		return result;
+	}
+	public void setResult(String result) {
+		this.result = result;
+	}
+}

+ 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;
+	}
 }

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

@@ -1,6 +1,6 @@
 package com.goafanti.customer.bo;
 
-public class CustomerListOut extends CustomerListIn{
+public class CustomerListOut extends CustomerListIn{	
 	/** 客户ID **/
 	private String uid;
 	

+ 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{
+	
+}

+ 85 - 0
src/main/java/com/goafanti/customer/bo/FollowBusinessBo.java

@@ -0,0 +1,85 @@
+package com.goafanti.customer.bo;
+
+import java.util.List;
+
+import com.goafanti.common.model.UserBusiness;
+
+/**
+ * 新增和修改
+ * @author WangHui
+ *
+ */
+public class FollowBusinessBo {
+	/** 客户ID **/
+	private String uid;
+	/** 客户名 **/
+	private String identityName;
+	/** 当前联系人姓名 **/
+	private String contacts;
+	/** 新的联系人 **/
+	private String contactMobile;
+	/** 需要保存的联系人ID **/
+	private String ocbId;
+	/** 联系方式 **/
+	private String contactType;
+	/** 拜访结果 **/
+	private String result;
+	/** 拜访时间 **/
+	private String followTime;
+	/** 业务意向列表 **/
+	private List<UserBusiness> userBusinessList;
+	public String getUid() {
+		return uid;
+	}
+	public void setUid(String uid) {
+		this.uid = uid;
+	}
+	public String getIdentityName() {
+		return identityName;
+	}
+	public void setIdentityName(String identityName) {
+		this.identityName = identityName;
+	}
+	public String getContacts() {
+		return contacts;
+	}
+	public void setContacts(String contacts) {
+		this.contacts = contacts;
+	}
+	public String getContactMobile() {
+		return contactMobile;
+	}
+	public void setContactMobile(String contactMobile) {
+		this.contactMobile = contactMobile;
+	}
+	public String getOcbId() {
+		return ocbId;
+	}
+	public void setOcbId(String ocbId) {
+		this.ocbId = ocbId;
+	}
+	public String getContactType() {
+		return contactType;
+	}
+	public void setContactType(String contactType) {
+		this.contactType = contactType;
+	}
+	public String getResult() {
+		return result;
+	}
+	public void setResult(String result) {
+		this.result = result;
+	}
+	public String getFollowTime() {
+		return followTime;
+	}
+	public void setFollowTime(String followTime) {
+		this.followTime = followTime;
+	}
+	public List<UserBusiness> getUserBusinessList() {
+		return userBusinessList;
+	}
+	public void setUserBusinessList(List<UserBusiness> userBusinessList) {
+		this.userBusinessList = userBusinessList;
+	}
+}

+ 67 - 0
src/main/java/com/goafanti/customer/bo/FollowListBo.java

@@ -0,0 +1,67 @@
+package com.goafanti.customer.bo;
+
+public class FollowListBo {
+	/** 跟进记录ID **/
+	private String followId;
+	
+	/** 跟进时间  **/
+	private String followTime;
+	
+	/** 客户名 **/
+	private String identityName;
+	
+	/** 联系人 **/
+	private String contacts;
+	
+	/** 联系电话 **/
+	private String contactMobile;
+	
+	/** 跟进结果 **/
+	private String result;
+	
+	/** 拜访人姓名 **/
+	private String adminName;
+	
+	public String getFollowId() {
+		return followId;
+	}
+	public void setFollowId(String followId) {
+		this.followId = followId;
+	}
+	public String getFollowTime() {
+		return followTime;
+	}
+	public void setFollowTime(String followTime) {
+		this.followTime = followTime;
+	}
+	public String getIdentityName() {
+		return identityName;
+	}
+	public void setIdentityName(String identityName) {
+		this.identityName = identityName;
+	}
+	public String getContacts() {
+		return contacts;
+	}
+	public void setContacts(String contacts) {
+		this.contacts = contacts;
+	}
+	public String getContactMobile() {
+		return contactMobile;
+	}
+	public void setContactMobile(String contactMobile) {
+		this.contactMobile = contactMobile;
+	}
+	public String getResult() {
+		return result;
+	}
+	public void setResult(String result) {
+		this.result = result;
+	}
+	public String getAdminName() {
+		return adminName;
+	}
+	public void setAdminName(String adminName) {
+		this.adminName = adminName;
+	}
+}

+ 16 - 0
src/main/java/com/goafanti/customer/bo/UserDetailBo.java

@@ -0,0 +1,16 @@
+package com.goafanti.customer.bo;
+
+import com.goafanti.common.model.User;
+
+public class UserDetailBo extends User{
+	private String createTimes;
+
+	public String getCreateTimes() {
+		return createTimes;
+	}
+
+	public void setCreateTimes(String createTimes) {
+		this.createTimes = createTimes;
+	}
+	
+}

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

@@ -0,0 +1,73 @@
+package com.goafanti.customer.controller;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+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.constant.AFTConstants;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.BaseController;
+import com.goafanti.common.utils.StringUtils;
+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;
+
+@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(StringUtils.isBlank(bfb.getBusinessGlossoryId()) || StringUtils.isBlank(bfb.getUid())){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,""));
+			return res;
+		}		
+		if(businessService.judgeBusiness(bfb.getUid(), Integer.parseInt(bfb.getBusinessGlossoryId()))>0){
+			res.getError().add(new Error("该项业务已经被跟进"));
+			return res;
+		}
+		businessService.addBusinessAndFollow(bfb);
+		return res;
+	}
+	
+	/** 进入新增意向服务 **/
+	@RequestMapping(value = "/toAddBusinessAndFollow", method = RequestMethod.GET)
+	public Result toAddBusinessAndFollow(){
+		Result res = new Result();
+		BussinessFollowBo bo = new BussinessFollowBo();
+		bo.setAdminName(TokenManager.getAdminToken().getName());
+		SimpleDateFormat format = new SimpleDateFormat(AFTConstants.YYYYMMDDHHMMSS);
+		bo.setCreateTime(format.format(new Date()));
+		bo.setFollowTime(bo.getCreateTime());
+		res.setData(bo);
+		return res;
+	}
+
+}

+ 192 - 0
src/main/java/com/goafanti/customer/controller/CustomerApiController.java

@@ -0,0 +1,192 @@
+package com.goafanti.customer.controller;
+
+import java.lang.reflect.InvocationTargetException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+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.constant.AFTConstants;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.BaseController;
+import com.goafanti.common.model.User;
+import com.goafanti.common.utils.BeanUtilsExt;
+import com.goafanti.common.utils.StringUtils;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.customer.bo.CustomerListIn;
+import com.goafanti.customer.bo.CustomerOrganizationDetailBo;
+import com.goafanti.customer.bo.FollowBusinessBo;
+import com.goafanti.customer.bo.UserDetailBo;
+import com.goafanti.customer.service.BusinessService;
+import com.goafanti.customer.service.CustomerService;
+
+@RestController
+@RequestMapping("api/admin/customer")
+public class CustomerApiController extends BaseController{
+	@Resource
+	private CustomerService customerService;
+	@Resource
+	private BusinessService businessService;
+	/** 私有个人客户列表 **/
+	@RequestMapping(value = "/listPrivatePersonalCustomer" , method = RequestMethod.POST)
+	public Result listPrivatePersonalCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
+		Result res = new Result();
+		res.setData(customerService.listPrivatePersonalCustomer(cli, pageNo, pageSize));
+		return res;
+	}
+	
+	/** 公共个人客户列表 **/
+	@RequestMapping(value = "/listPublicPersonalCustomer" , method = RequestMethod.POST)
+	public Result listPublicPersonalCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
+		Result res = new Result();
+		res.setData(customerService.listPublicPersonalCustomer(cli, pageNo, pageSize));
+		return res;
+	}
+
+	/** 个人客户查询 **/
+	@RequestMapping(value = "/listAllPersonalCustomer" , method = RequestMethod.POST)
+	public Result listAllPersonalCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
+		Result res = new Result();
+		res.setData(customerService.listAllPersonalCustomer(cli, pageNo, pageSize));
+		return res;
+	}
+	
+	/** 私有单位客户列表 **/
+	@RequestMapping(value = "/listPrivateOrganizationCustomer" , method = RequestMethod.POST)
+	public Result listPrivateOrganizationCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
+		Result res = new Result();
+		res.setData(customerService.listPrivateOrganizationCustomer(cli, pageNo, pageSize));
+		return res;
+	}
+	
+	/** 公共单位客户列表 **/
+	@RequestMapping(value = "/listPublicOrganizationCustomer" , method = RequestMethod.POST)
+	public Result listPublicOrganizationCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
+		Result res = new Result();
+		res.setData(customerService.listPublicOrganizationCustomer(cli, pageNo, pageSize));
+		return res;
+	}
+
+	/** 单位客户查询 **/
+	@RequestMapping(value = "/listAllOrganizationCustomer" , method = RequestMethod.POST)
+	public Result listAllOrganizationCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
+		Result res = new Result();
+		res.setData(customerService.listAllOrganizationCustomer(cli, pageNo, pageSize));
+		return res;
+	}
+	
+	
+	/** 客户即时检索 **/
+	@RequestMapping(value = "/findCustomerByName",method = RequestMethod.GET)
+	public Result findCustomerByName(String name){
+		Result res = new Result();
+		res.setData(customerService.findCustomerByName(name));
+		return res;
+	}
+	
+	/** 添加客户基本信息  **/
+	@RequestMapping(value = "/addCustomer", method = RequestMethod.POST)
+	public Result addCustomer(String name,String contacts,String contactMobile,String type){
+		Result res = new Result();
+		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(buildError(ErrorConstants.PARAM_ERROR,""));
+			return res;
+		} 
+		customerService.updateOrganizationCustomer(bo);
+		return res;
+	}
+	
+	/** 查看跟进记录 **/
+	@RequestMapping(value = "/listFollowHistory", method = RequestMethod.GET)
+	public Result listFollowHistory(Integer pageNo, Integer pageSize,String uid){
+		Result res = new Result();
+		res.setData(customerService.listFollowHistory(pageNo,pageSize,uid));
+		return res;
+	}
+	
+	/** 查看客户账户信息 **/
+	@RequestMapping(value = "/findUserAccountDetail", method = RequestMethod.GET)
+	public Result findUserAcountDetail(String uid){
+		Result res = new Result();
+		UserDetailBo bo = new UserDetailBo();
+		User user = customerService.findUserAccountDetail(uid);
+		try {
+			BeanUtilsExt.copyProperties(bo, user);
+		} catch (InvocationTargetException | IllegalAccessException e) {
+			e.printStackTrace();
+		}
+		SimpleDateFormat format = new SimpleDateFormat(AFTConstants.YYYYMMDDHHMMSS);
+		bo.setCreateTimes(format.format(user.getCreateTime()));
+		res.setData(bo);
+		return res;
+	}
+	
+	/** 修改客户账户信息 **/
+	@RequestMapping(value = "/updateUserAccount", method = RequestMethod.POST)
+	public Result updateUserAccount(User user){
+		Result res = new Result();
+		customerService.updateUserAccount(user);
+		return res;
+	}
+
+	/** 查看客户联系人列表 **/
+	@RequestMapping(value = "/findCustomerContacts", method = RequestMethod.GET)
+	public Result findCustomerContacts(String uid){
+		Result res = new Result();
+		res.setData(customerService.findCustomerContacts(uid));
+		return res;
+	}
+	
+	/** 进入添加拜访记录 **/
+	@RequestMapping(value = "/toAddFollow", method = RequestMethod.GET)
+	public Result toAddFollow(String uid){
+		Result res =  new Result();
+		User user = customerService.findUserAccountDetail(uid);
+		FollowBusinessBo fbb = new FollowBusinessBo();
+		SimpleDateFormat format = new SimpleDateFormat(AFTConstants.YYYYMMDDHHMMSS);
+		fbb.setFollowTime(format.format(new Date()));
+		fbb.setIdentityName(user.getIdentifyName());
+		fbb.setUid(uid);
+		fbb.setUserBusinessList(businessService.findBusinessByUAid(uid, TokenManager.getAdminId()));
+		res.setData(fbb);
+		return res;
+	}
+	
+	/** 添加拜访记录 **/
+	@RequestMapping(value = "/addFollow", method = RequestMethod.POST)
+	public Result addFollow(FollowBusinessBo fbb){
+		Result res =  new Result();
+		customerService.addFollow(fbb);
+		return res;
+	}
+}

+ 0 - 84
src/main/java/com/goafanti/customer/controller/CustomerController.java

@@ -1,84 +0,0 @@
-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.Result;
-import com.goafanti.common.controller.BaseController;
-import com.goafanti.customer.bo.CustomerListIn;
-import com.goafanti.customer.service.CustomerService;
-
-@RestController
-@RequestMapping("api/admin/customer")
-public class CustomerController extends BaseController{
-	@Resource
-	private CustomerService customerService;
-	
-	/** 私有个人客户列表 **/
-	@RequestMapping(value = "/listPrivatePersonalCustomer" , method = RequestMethod.POST)
-	public Result listPrivatePersonalCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
-		Result res = new Result();
-		res.setData(customerService.listPrivatePersonalCustomer(cli, pageNo, pageSize));
-		return res;
-	}
-	
-	/** 公共个人客户列表 **/
-	@RequestMapping(value = "/listPublicPersonalCustomer" , method = RequestMethod.POST)
-	public Result listPublicPersonalCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
-		Result res = new Result();
-		res.setData(customerService.listPublicPersonalCustomer(cli, pageNo, pageSize));
-		return res;
-	}
-
-	/** 个人客户查询 **/
-	@RequestMapping(value = "/listAllPersonalCustomer" , method = RequestMethod.POST)
-	public Result listAllPersonalCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
-		Result res = new Result();
-		res.setData(customerService.listAllPersonalCustomer(cli, pageNo, pageSize));
-		return res;
-	}
-	
-	/** 私有单位客户列表 **/
-	@RequestMapping(value = "/listPrivateOrganizationCustomer" , method = RequestMethod.POST)
-	public Result listPrivateOrganizationCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
-		Result res = new Result();
-		res.setData(customerService.listPrivateOrganizationCustomer(cli, pageNo, pageSize));
-		return res;
-	}
-	
-	/** 公共单位客户列表 **/
-	@RequestMapping(value = "/listPublicOrganizationCustomer" , method = RequestMethod.POST)
-	public Result listPublicOrganizationCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
-		Result res = new Result();
-		res.setData(customerService.listPublicOrganizationCustomer(cli, pageNo, pageSize));
-		return res;
-	}
-
-	/** 单位客户查询 **/
-	@RequestMapping(value = "/listAllOrganizationCustomer" , method = RequestMethod.POST)
-	public Result listAllOrganizationCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
-		Result res = new Result();
-		res.setData(customerService.listAllOrganizationCustomer(cli, pageNo, pageSize));
-		return res;
-	}
-	
-	
-	/** 客户即时检索 **/
-	@RequestMapping(value = "/findCustomerByName",method = RequestMethod.GET)
-	public Result findCustomerByName(String name){
-		Result res = new Result();
-		res.setData(customerService.findCustomerByName(name));
-		return res;
-	}
-	
-	/** 添加客户基本信息  **/
-	@RequestMapping(value = "/addCustomer", method = RequestMethod.POST)
-	public Result addCustomer(String name,String contacts,String contactMobile,String type){
-		Result res = new Result();
-		customerService.addCustomer(name, contacts, contactMobile, Integer.parseInt(type));
-		return res;
-	}
-}

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

@@ -0,0 +1,45 @@
+package com.goafanti.customer.service;
+
+import java.util.List;
+
+import com.goafanti.common.model.UserBusiness;
+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);
+	
+	/**
+	 * 查询业务列表
+	 * @param uid 客户ID
+	 * @param aid 营销员ID
+	 * @return
+	 */
+	List<UserBusiness> findBusinessByUAid(String uid,String aid);
+}

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

@@ -2,10 +2,16 @@ package com.goafanti.customer.service;
 
 import java.util.List;
 
+import com.goafanti.common.model.OrganizationContactBook;
+import com.goafanti.common.model.User;
 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;
+import com.goafanti.customer.bo.FollowBusinessBo;
+import com.goafanti.customer.bo.FollowListBo;
 
 public interface CustomerService {
 	/**
@@ -16,7 +22,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 +30,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 +40,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 +49,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 +58,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 +68,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 +92,62 @@ 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);
+	
+	/**
+	 * 查看跟进记录列表
+	 * @param pageNo
+	 * @param pageSize
+	 * @return
+	 */
+	Pagination<FollowListBo> listFollowHistory(Integer pageNo, Integer pageSize,String uid);
+	
+	/**
+	 * 查看客户账户信息
+	 * @param uid 客户ID
+	 * @return
+	 */
+	User findUserAccountDetail(String uid);
+	
+	/**
+	 * 更新用户基本信息
+	 * @param user
+	 */
+	int updateUserAccount(User user);
+	
+	/**
+	 * 客户联系人列表
+	 * @param uid
+	 * @return
+	 */
+	List<OrganizationContactBook> findCustomerContacts(String uid);
+	
+	/**
+	 * 添加拜访记录
+	 * @param fbb
+	 */
+	int addFollow(FollowBusinessBo fbb);
 }

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

@@ -0,0 +1,110 @@
+package com.goafanti.customer.service.impl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.commons.beanutils.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+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
+	@Transactional
+	public void addBusinessAndFollow(BussinessFollowBo bfb) {
+		UserBusiness ub = new UserBusiness();
+		String ubId = UUID.randomUUID().toString();
+		Date date = new Date();
+		ub.setCustomerStatus(Integer.parseInt(bfb.getCustomerStatus()));
+		ub.setFollowSituation(Integer.parseInt(bfb.getFollowSituation()));
+		ub.setId(ubId);
+		ub.setUid(bfb.getUid());
+		ub.setAid(TokenManager.getAdminId());
+		ub.setRemarks(bfb.getRemarks());
+		ub.setUpdateTime(date);
+		ub.setCreateTime(date);
+		userBusinessMapper.insert(ub);
+		if (StringUtils.isNotBlank(bfb.getOcbId())) { // 跟进联系人不为空则添加跟进记录
+			UserFollow uf = new UserFollow();
+			String ufId = UUID.randomUUID().toString();
+			uf.setId(ufId);
+			uf.setUid(bfb.getUid());
+			uf.setCreateTime(date);
+			uf.setOcbId(bfb.getOcbId());
+			uf.setResult(bfb.getResult());
+			uf.setContactType(Integer.parseInt(bfb.getContactType()));
+			uf.setAid(TokenManager.getAdminId());
+			uf.setEffective(0);
+			int followCount = userBusinessMapper.judgeBusiness(bfb.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);
+		}
+	}
+
+	@Override
+	public List<UserBusiness> findBusinessByUAid(String uid, String aid) {
+		
+		return userBusinessMapper.findBusinessByUAid(uid,aid);
+	}
+}

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

@@ -1,11 +1,14 @@
 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.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -13,20 +16,30 @@ import org.springframework.transaction.annotation.Transactional;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.OrganizationContactBookMapper;
 import com.goafanti.common.dao.OrganizationIdentityMapper;
+import com.goafanti.common.dao.UserBusinessMapper;
 import com.goafanti.common.dao.UserIdentityMapper;
 import com.goafanti.common.dao.UserMapper;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.User;
+import com.goafanti.common.model.UserBusiness;
+import com.goafanti.common.model.UserFollow;
+import com.goafanti.common.model.UserFollowBusiness;
 import com.goafanti.common.model.UserIdentity;
+import com.goafanti.common.utils.BeanUtilsExt;
+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.bo.FollowBusinessBo;
+import com.goafanti.customer.bo.FollowListBo;
 import com.goafanti.customer.service.CustomerService;
 
 @Service
@@ -39,6 +52,10 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 	private OrganizationIdentityMapper organizationIdentityMapper;
 	@Autowired
 	private OrganizationContactBookMapper organizationContactBookMapper;
+	@Resource(name = "passwordUtil")
+	private PasswordUtil					passwordUtil;
+	@Resource
+	private UserBusinessMapper userBusinessMapper;
 	@Override
 	public Pagination<CustomerListOut> listPrivatePersonalCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
 		cli.setType(AFTConstants.USER_TYPE_PERSONAL);
@@ -123,6 +140,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 +179,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 +206,112 @@ 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.setUid(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 {
+			BeanUtilsExt.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;
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<FollowListBo> listFollowHistory(Integer pageNo, Integer pageSize,String uid) {
+		Map<String, Object> params = new HashMap<String, Object>();
+		if(StringUtils.isNotBlank(uid))params.put("uid", uid);
+		return (Pagination<FollowListBo>)findPage("selectFollowHistoryList","selectFollowHistoryCount",params, pageNo, pageSize);
+	}
+
+	@Override
+	public User findUserAccountDetail(String uid) {
+		
+		return userMapper.findUserAccountDetail(uid);
+	}
+
+	@Override
+	public int updateUserAccount(User user) {
+		
+		return userMapper.updateByPrimaryKeySelective(user);
+	}
+
+	@Override
+	public List<OrganizationContactBook> findCustomerContacts(String uid) {
+		
+		return userMapper.findCustomerContacts(uid,TokenManager.getAdminId());
+	}
+
+	@Override
+	@Transactional
+	public int addFollow(FollowBusinessBo fbb) {
+		Date date = new Date();
+		UserFollow userFollow = new UserFollow();
+		String ufId = UUID.randomUUID().toString();
+		userFollow.setId(ufId);
+		userFollow.setAid(TokenManager.getAdminId());
+		userFollow.setContactType(Integer.parseInt(fbb.getContactType()));
+		userFollow.setEffective(0);
+		userFollow.setCreateTime(date);
+		userFollow.setOcbId(fbb.getOcbId());
+		userFollow.setResult(fbb.getResult());
+		userFollow.setUid(fbb.getUid());
+		int followCount = userBusinessMapper.judgeBusiness(fbb.getUid(), null, TokenManager.getAdminId()) + 1;
+		userFollow.setFollowCount(followCount);
+		String ufbId = "";
+		UserFollowBusiness ufb = null;
+		for(UserBusiness ub: fbb.getUserBusinessList()){
+			ufb = new UserFollowBusiness();
+			ufbId = UUID.randomUUID().toString();
+			if(StringUtils.isNotBlank(ub.getId())){
+				ufb.setBusinessId(ub.getId()); //意向表ID
+				ufb.setCustomerStatus(ub.getCustomerStatus());
+				ufb.setFollowId(ufbId);
+				ufb.setFollowSituation(ub.getFollowSituation());
+				//更新
+			}else{
+				//检测是否可以创建业务
+			}
+			
+		}
+		return 1;
 	}
 	
 }