Browse Source

Merge branch 'test' of jishutao/kede-server into prod

anderx 5 years ago
parent
commit
2189e4d2f7

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

@@ -11,68 +11,68 @@ public interface ThirdPartyCompanyMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	long countByExample(ThirdPartyCompanyExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	int deleteByExample(ThirdPartyCompanyExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	int deleteByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	int insert(ThirdPartyCompany record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	int insertSelective(ThirdPartyCompany record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	List<ThirdPartyCompany> selectByExample(ThirdPartyCompanyExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	ThirdPartyCompany selectByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	int updateByExampleSelective(@Param("record") ThirdPartyCompany record,
 			@Param("example") ThirdPartyCompanyExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	int updateByExample(@Param("record") ThirdPartyCompany record, @Param("example") ThirdPartyCompanyExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	int updateByPrimaryKeySelective(ThirdPartyCompany record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	int updateByPrimaryKey(ThirdPartyCompany record);
 

+ 3 - 0
src/main/java/com/goafanti/common/dao/UserLockReleaseMapper.java

@@ -117,4 +117,7 @@ public interface UserLockReleaseMapper {
 
 	List<userDaysBo> selectUserDays(@Param("aid")String aid, @Param("x")Integer x, @Param("y")Integer y);
 
+	int updateUserMid(@Param("uid")String uid, @Param("aid")String aid, @Param("followTime")Date followTime, @Param("lockTime")Date lockTime);
+	
+	int insertUserMid(@Param("uid")String uid, @Param("aid")String aid, @Param("followTime")Date followTime, @Param("lockTime")Date lockTime);
 }

+ 37 - 22
src/main/java/com/goafanti/common/mapper/ThirdPartyCompanyMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 21 11:29:02 CST 2020.
+      This element was generated on Thu Oct 22 16:26:31 CST 2020.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="tid" jdbcType="INTEGER" property="tid" />
@@ -26,12 +26,13 @@
     <result column="patent_name_type" jdbcType="INTEGER" property="patentNameType" />
     <result column="official_amount" jdbcType="DECIMAL" property="officialAmount" />
     <result column="start_type" jdbcType="INTEGER" property="startType" />
+    <result column="patent_type" jdbcType="INTEGER" property="patentType" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 21 11:29:02 CST 2020.
+      This element was generated on Thu Oct 22 16:26:31 CST 2020.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -65,7 +66,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 21 11:29:02 CST 2020.
+      This element was generated on Thu Oct 22 16:26:31 CST 2020.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -99,17 +100,17 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 21 11:29:02 CST 2020.
+      This element was generated on Thu Oct 22 16:26:31 CST 2020.
     -->
     id, tid, company_name, unit_price, quantity, total_amount, material, urgent, audit, 
     assets, income, remarks, create_time, cid, party_amount, type, patent_name_type, 
-    official_amount, start_type
+    official_amount, start_type, patent_type
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.ThirdPartyCompanyExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 21 11:29:02 CST 2020.
+      This element was generated on Thu Oct 22 16:26:31 CST 2020.
     -->
     select
     <if test="distinct">
@@ -128,7 +129,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 21 11:29:02 CST 2020.
+      This element was generated on Thu Oct 22 16:26:31 CST 2020.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -139,7 +140,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 21 11:29:02 CST 2020.
+      This element was generated on Thu Oct 22 16:26:31 CST 2020.
     -->
     delete from third_party_company
     where id = #{id,jdbcType=INTEGER}
@@ -148,7 +149,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 21 11:29:02 CST 2020.
+      This element was generated on Thu Oct 22 16:26:31 CST 2020.
     -->
     delete from third_party_company
     <if test="_parameter != null">
@@ -159,7 +160,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 21 11:29:02 CST 2020.
+      This element was generated on Thu Oct 22 16:26:31 CST 2020.
     -->
     insert into third_party_company (id, tid, company_name, 
       unit_price, quantity, total_amount, 
@@ -167,20 +168,20 @@
       assets, income, remarks, 
       create_time, cid, party_amount, 
       type, patent_name_type, official_amount, 
-      start_type)
+      start_type, patent_type)
     values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{companyName,jdbcType=VARCHAR}, 
       #{unitPrice,jdbcType=DECIMAL}, #{quantity,jdbcType=INTEGER}, #{totalAmount,jdbcType=DECIMAL}, 
       #{material,jdbcType=INTEGER}, #{urgent,jdbcType=INTEGER}, #{audit,jdbcType=INTEGER}, 
       #{assets,jdbcType=VARCHAR}, #{income,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, 
       #{createTime,jdbcType=TIMESTAMP}, #{cid,jdbcType=INTEGER}, #{partyAmount,jdbcType=DECIMAL}, 
       #{type,jdbcType=INTEGER}, #{patentNameType,jdbcType=INTEGER}, #{officialAmount,jdbcType=DECIMAL}, 
-      #{startType,jdbcType=INTEGER})
+      #{startType,jdbcType=INTEGER}, #{patentType,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.ThirdPartyCompany">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 21 11:29:02 CST 2020.
+      This element was generated on Thu Oct 22 16:26:31 CST 2020.
     -->
     insert into third_party_company
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -241,6 +242,9 @@
       <if test="startType != null">
         start_type,
       </if>
+      <if test="patentType != null">
+        patent_type,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -300,13 +304,16 @@
       <if test="startType != null">
         #{startType,jdbcType=INTEGER},
       </if>
+      <if test="patentType != null">
+        #{patentType,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.ThirdPartyCompanyExample" resultType="java.lang.Long">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 21 11:29:02 CST 2020.
+      This element was generated on Thu Oct 22 16:26:31 CST 2020.
     -->
     select count(*) from third_party_company
     <if test="_parameter != null">
@@ -317,7 +324,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 21 11:29:02 CST 2020.
+      This element was generated on Thu Oct 22 16:26:31 CST 2020.
     -->
     update third_party_company
     <set>
@@ -378,6 +385,9 @@
       <if test="record.startType != null">
         start_type = #{record.startType,jdbcType=INTEGER},
       </if>
+      <if test="record.patentType != null">
+        patent_type = #{record.patentType,jdbcType=INTEGER},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -387,7 +397,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 21 11:29:02 CST 2020.
+      This element was generated on Thu Oct 22 16:26:31 CST 2020.
     -->
     update third_party_company
     set id = #{record.id,jdbcType=INTEGER},
@@ -408,7 +418,8 @@
       type = #{record.type,jdbcType=INTEGER},
       patent_name_type = #{record.patentNameType,jdbcType=INTEGER},
       official_amount = #{record.officialAmount,jdbcType=DECIMAL},
-      start_type = #{record.startType,jdbcType=INTEGER}
+      start_type = #{record.startType,jdbcType=INTEGER},
+      patent_type = #{record.patentType,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -417,7 +428,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 21 11:29:02 CST 2020.
+      This element was generated on Thu Oct 22 16:26:31 CST 2020.
     -->
     update third_party_company
     <set>
@@ -475,6 +486,9 @@
       <if test="startType != null">
         start_type = #{startType,jdbcType=INTEGER},
       </if>
+      <if test="patentType != null">
+        patent_type = #{patentType,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -482,7 +496,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 21 11:29:02 CST 2020.
+      This element was generated on Thu Oct 22 16:26:31 CST 2020.
     -->
     update third_party_company
     set tid = #{tid,jdbcType=INTEGER},
@@ -502,13 +516,14 @@
       type = #{type,jdbcType=INTEGER},
       patent_name_type = #{patentNameType,jdbcType=INTEGER},
       official_amount = #{officialAmount,jdbcType=DECIMAL},
-      start_type = #{startType,jdbcType=INTEGER}
+      start_type = #{startType,jdbcType=INTEGER},
+      patent_type = #{patentType,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
   <select id="selectByTid" resultType="com.goafanti.organization.bo.OutThirdPartyCompany">
-   select a.id,a.tid,a.company_name companyName,a.unit_price unitPrice,a.quantity,a.total_amount totalAmount,a.material,a.urgent,
+	 select a.id,a.tid,a.company_name companyName,a.unit_price unitPrice,a.quantity,a.total_amount totalAmount,a.material,a.urgent,
 	a.patent_name_type patentNameType,a.audit,a.assets,a.income,a.remarks,a.cid,b.cost_reduction costReduction,b.official_cost officialCost,
-	a.type,a.party_amount partyAmount ,op.amount officialUnitPrice,op.proportion85 reductionAmount,a.start_type startType
+	a.type,a.party_amount partyAmount ,op.amount officialUnitPrice,op.proportion85 reductionAmount,a.start_type startType,a.patent_type patentType
 	from third_party_company a left join t_order_task b on a.tid=b.id  left join official_fee_price op on a.patent_name_type=op.`type` 
  where tid= #{tid}
   </select>

+ 11 - 0
src/main/java/com/goafanti/common/mapper/UserLockReleaseMapper.xml

@@ -444,4 +444,15 @@
 	where datediff(now(),if(t0.lock_time &lt; t1.last_follow_time,t1.last_follow_time,t1.t0.lock_time))> #{x} or datediff(now(),t0.lock_time)> #{y}
   
   </select>
+  
+  
+   <insert id="insertUserMid">
+  insert into user_mid (uid,aid,last_sign_time,last_follow_time,create_time)
+  values (#{uid},#{aid},#{lockTime},#{followTime},now())
+  </insert>
+  <update id="updateUserMid" >
+  update user_mid 
+  set last_sign_time=#{lockTime},last_follow_time=#{followTime}
+  where uid=#{uid} and aid=#{aid}
+  </update> 
 </mapper>

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

@@ -411,30 +411,27 @@
 	</select>
 	
 	<select id="selectPrivateOrganizationCustomerList" resultType="com.goafanti.customer.bo.CustomerListOut">
-			select a.id uid,a.aid,a.identify_name name,a.society_tag societyTag,a.`level`,b.name aName,dg1.name as province,dg2.name as city, a.guidance,
-				dg3.name as area,d.contacts,d.contact_mobile as contactMobile,date_format(t0.last_sign_time,'%Y-%m-%d %H:%i:%S') lastSignTime,
-				date_format(t1.last_follow_time,'%Y-%m-%d %H:%i:%S') lastFollowTime,date_format(a.transfer_time,'%Y-%m-%d %H:%i:%S') as transferTime,
-			  	date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as createTime,if(a.transfer_time &lt; t1.last_follow_time,t1.last_follow_time,a.transfer_time) as orderTime
-			from user a left join admin b on  a.aid=b.id left join admin c on b.superior_id=c.id
-			left join organization_identity d on a.id = d.uid left join district_glossory dg1 on d.location_province = dg1.id
-			left join district_glossory dg2 on d.location_city = dg2.id left join district_glossory dg3 on d.location_area = dg3.id
-			<if test="power != 0">
-			left join (select aid,uid,max(lock_time) last_sign_time from user_lock_release group by aid,uid) t0 on a.id=t0.uid and a.aid=t0.aid
-			left join (select uid,aid,max(create_time)  last_follow_time from user_follow  group by aid,uid)t1 on a.id=t1.uid and a.aid=t1.aid
-			</if>
-			<if test="power == 0">
-			left join (select aid,uid,max(lock_time) last_sign_time from user_lock_release where aid= #{aid,jdbcType=VARCHAR} group by uid) t0 on a.id=t0.uid 
-			left join (select uid,aid,max(create_time) last_follow_time from user_follow  where aid= #{aid,jdbcType=VARCHAR} group by uid) t1 on a.id=t1.uid 
-			</if>
-			where a.type= 1 and a.share_type=0  and source !=0
+	select a.id uid,a.aid,a.identify_name name,a.society_tag societyTag,a.`level`,b.name aName,dg1.name as province,dg2.name as city,
+	a.guidance, dg3.name as area,d.contacts,d.contact_mobile as contactMobile,
+	date_format(um.last_sign_time,'%Y-%m-%d %H:%i:%S') lastSignTime,
+	date_format(a.transfer_time,'%Y-%m-%d %H:%i:%S') as transferTime, 
+	date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as createTime,
+	date_format(um.last_follow_time,'%Y-%m-%d %H:%i:%S') lastFollowTime, 
+	if(a.transfer_time &lt; um.last_follow_time,um.last_follow_time,a.transfer_time) as orderTime 
+	from user a left join admin b on a.aid=b.id left join organization_identity d on a.id = d.uid 
+	left join district_glossory dg1 on d.location_province = dg1.id 
+	left join district_glossory dg2 on d.location_city = dg2.id 
+	left join district_glossory dg3 on d.location_area = dg3.id
+	left join user_mid um on um.aid=a.aid and um.uid=a.id
+	where a.type= 1 and a.share_type=0  and a.source in(1,2,3)
 		<if test="power ==0">
 			and a.aid = #{aid,jdbcType=VARCHAR}
 		</if>
-		<if test="power ==1">
-			and  b.superior_id= #{aid,jdbcType=VARCHAR} 
-		</if>
-		<if test="power ==2">
-			and (c.superior_id = #{aid,jdbcType=VARCHAR} or b.superior_id= #{aid,jdbcType=VARCHAR}) 
+		<if test="power ==1  or power ==2">
+			and a.aid in
+			<foreach item="item" collection="alist" separator="," open="(" close=")" index="">
+		       #{item}
+		     </foreach> 
 		</if>
 		<if test="name != null and name != ''">
 			and a.identify_name like concat('%',#{name},'%')
@@ -454,7 +451,7 @@
 		<if test="area != null">
 			and d.location_area = #{area,jdbcType=INTEGER}
 		</if>
-		<if test="level != null">
+		 <if test="level != null">
 			and a.level = #{level,jdbcType=INTEGER}
 		</if>
 		<if test="sort != 1">
@@ -468,22 +465,22 @@
 		 </if>
 		 <if test="page_sql != null">
     		${page_sql}
-   		 </if>
+   		 </if> 
 	</select>
 	<select id="selectPrivateOrganizationCustomerCount" resultType="java.lang.Integer">
 			select count(*)
-			from user a left join admin b on  a.aid=b.id left join admin c on b.superior_id=c.id
+			from user a left join admin b on  a.aid=b.id 
 			left join organization_identity d on a.id = d.uid left join district_glossory dg1 on d.location_province = dg1.id
 			left join district_glossory dg2 on d.location_city = dg2.id left join district_glossory dg3 on d.location_area = dg3.id
-			where a.type= 1 and a.share_type=0  and source !=0
+			where a.type= 1 and a.share_type=0  and a.source in(1,2,3)
 		<if test="power ==0">
 			and a.aid = #{aid,jdbcType=VARCHAR}
 		</if>
-		<if test="power ==1">
-			and  b.superior_id= #{aid,jdbcType=VARCHAR}
-		</if>
-		<if test="power ==2">
-			and (c.superior_id = #{aid,jdbcType=VARCHAR} or b.superior_id= #{aid,jdbcType=VARCHAR}) 
+		<if test="power ==1 or power ==2">
+			and a.aid in
+			<foreach item="item" collection="alist" separator="," open="(" close=")" index="">
+		       #{item}
+		     </foreach> 
 		</if>
 		<if test="name != null and name != ''">
 			and a.identify_name like concat('%',#{name},'%')

+ 80 - 57
src/main/java/com/goafanti/common/model/ThirdPartyCompany.java

@@ -12,108 +12,113 @@ public class ThirdPartyCompany {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.id
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private Integer id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.tid
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private Integer tid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.company_name
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private String companyName;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.unit_price
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	@DecimalMax(value = "999999", message = "{" + ErrorConstants.DECIMAL_PARAM_MAX_ERROR + "}")
 	@DecimalMin(value = "0", message = "{" + ErrorConstants.DECIMAL_PARAM_MIN_ERROR + "}")
 	private BigDecimal unitPrice;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.quantity
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private Integer quantity;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.total_amount
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	@DecimalMax(value = "999999", message = "{" + ErrorConstants.DECIMAL_PARAM_MAX_ERROR + "}")
 	@DecimalMin(value = "0", message = "{" + ErrorConstants.DECIMAL_PARAM_MIN_ERROR + "}")
 	private BigDecimal totalAmount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.material
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private Integer material;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.urgent
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private Integer urgent;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.audit
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private Integer audit;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.assets
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private String assets;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.income
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private String income;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.remarks
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private String remarks;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.create_time
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private Date createTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.cid
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private Integer cid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.party_amount
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private BigDecimal partyAmount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.type
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private Integer type;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.patent_name_type
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private Integer patentNameType;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.official_amount
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private BigDecimal officialAmount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.start_type
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	private Integer startType;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.patent_type
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
+	 */
+	private Integer patentType;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.id
 	 * @return  the value of third_party_company.id
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public Integer getId() {
 		return id;
@@ -122,7 +127,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.id
 	 * @param id  the value for third_party_company.id
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setId(Integer id) {
 		this.id = id;
@@ -131,7 +136,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.tid
 	 * @return  the value of third_party_company.tid
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public Integer getTid() {
 		return tid;
@@ -140,7 +145,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.tid
 	 * @param tid  the value for third_party_company.tid
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setTid(Integer tid) {
 		this.tid = tid;
@@ -149,7 +154,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.company_name
 	 * @return  the value of third_party_company.company_name
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public String getCompanyName() {
 		return companyName;
@@ -158,7 +163,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.company_name
 	 * @param companyName  the value for third_party_company.company_name
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setCompanyName(String companyName) {
 		this.companyName = companyName;
@@ -167,7 +172,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.unit_price
 	 * @return  the value of third_party_company.unit_price
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public BigDecimal getUnitPrice() {
 		return unitPrice;
@@ -176,7 +181,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.unit_price
 	 * @param unitPrice  the value for third_party_company.unit_price
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setUnitPrice(BigDecimal unitPrice) {
 		this.unitPrice = unitPrice;
@@ -185,7 +190,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.quantity
 	 * @return  the value of third_party_company.quantity
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public Integer getQuantity() {
 		return quantity;
@@ -194,7 +199,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.quantity
 	 * @param quantity  the value for third_party_company.quantity
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setQuantity(Integer quantity) {
 		this.quantity = quantity;
@@ -203,7 +208,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.total_amount
 	 * @return  the value of third_party_company.total_amount
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public BigDecimal getTotalAmount() {
 		return totalAmount;
@@ -212,7 +217,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.total_amount
 	 * @param totalAmount  the value for third_party_company.total_amount
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setTotalAmount(BigDecimal totalAmount) {
 		this.totalAmount = totalAmount;
@@ -221,7 +226,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.material
 	 * @return  the value of third_party_company.material
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public Integer getMaterial() {
 		return material;
@@ -230,7 +235,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.material
 	 * @param material  the value for third_party_company.material
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setMaterial(Integer material) {
 		this.material = material;
@@ -239,7 +244,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.urgent
 	 * @return  the value of third_party_company.urgent
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public Integer getUrgent() {
 		return urgent;
@@ -248,7 +253,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.urgent
 	 * @param urgent  the value for third_party_company.urgent
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setUrgent(Integer urgent) {
 		this.urgent = urgent;
@@ -257,7 +262,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.audit
 	 * @return  the value of third_party_company.audit
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public Integer getAudit() {
 		return audit;
@@ -266,7 +271,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.audit
 	 * @param audit  the value for third_party_company.audit
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setAudit(Integer audit) {
 		this.audit = audit;
@@ -275,7 +280,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.assets
 	 * @return  the value of third_party_company.assets
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public String getAssets() {
 		return assets;
@@ -284,7 +289,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.assets
 	 * @param assets  the value for third_party_company.assets
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setAssets(String assets) {
 		this.assets = assets;
@@ -293,7 +298,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.income
 	 * @return  the value of third_party_company.income
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public String getIncome() {
 		return income;
@@ -302,7 +307,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.income
 	 * @param income  the value for third_party_company.income
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setIncome(String income) {
 		this.income = income;
@@ -311,7 +316,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.remarks
 	 * @return  the value of third_party_company.remarks
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public String getRemarks() {
 		return remarks;
@@ -320,7 +325,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.remarks
 	 * @param remarks  the value for third_party_company.remarks
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setRemarks(String remarks) {
 		this.remarks = remarks;
@@ -329,7 +334,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.create_time
 	 * @return  the value of third_party_company.create_time
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -338,7 +343,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.create_time
 	 * @param createTime  the value for third_party_company.create_time
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -347,7 +352,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.cid
 	 * @return  the value of third_party_company.cid
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public Integer getCid() {
 		return cid;
@@ -356,7 +361,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.cid
 	 * @param cid  the value for third_party_company.cid
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setCid(Integer cid) {
 		this.cid = cid;
@@ -365,7 +370,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.party_amount
 	 * @return  the value of third_party_company.party_amount
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public BigDecimal getPartyAmount() {
 		return partyAmount;
@@ -374,7 +379,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.party_amount
 	 * @param partyAmount  the value for third_party_company.party_amount
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setPartyAmount(BigDecimal partyAmount) {
 		this.partyAmount = partyAmount;
@@ -383,7 +388,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.type
 	 * @return  the value of third_party_company.type
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public Integer getType() {
 		return type;
@@ -392,7 +397,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.type
 	 * @param type  the value for third_party_company.type
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setType(Integer type) {
 		this.type = type;
@@ -401,7 +406,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.patent_name_type
 	 * @return  the value of third_party_company.patent_name_type
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public Integer getPatentNameType() {
 		return patentNameType;
@@ -410,7 +415,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.patent_name_type
 	 * @param patentNameType  the value for third_party_company.patent_name_type
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setPatentNameType(Integer patentNameType) {
 		this.patentNameType = patentNameType;
@@ -419,7 +424,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.official_amount
 	 * @return  the value of third_party_company.official_amount
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public BigDecimal getOfficialAmount() {
 		return officialAmount;
@@ -428,7 +433,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.official_amount
 	 * @param officialAmount  the value for third_party_company.official_amount
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setOfficialAmount(BigDecimal officialAmount) {
 		this.officialAmount = officialAmount;
@@ -437,7 +442,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.start_type
 	 * @return  the value of third_party_company.start_type
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public Integer getStartType() {
 		return startType;
@@ -446,9 +451,27 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.start_type
 	 * @param startType  the value for third_party_company.start_type
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setStartType(Integer startType) {
 		this.startType = startType;
 	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.patent_type
+	 * @return  the value of third_party_company.patent_type
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
+	 */
+	public Integer getPatentType() {
+		return patentType;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.patent_type
+	 * @param patentType  the value for third_party_company.patent_type
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
+	 */
+	public void setPatentType(Integer patentType) {
+		this.patentType = patentType;
+	}
 }

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

@@ -8,23 +8,23 @@ import java.util.List;
 public class ThirdPartyCompanyExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public ThirdPartyCompanyExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -32,7 +32,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -40,7 +40,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -48,7 +48,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -56,7 +56,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -64,7 +64,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -72,7 +72,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -80,7 +80,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -90,7 +90,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -102,7 +102,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -111,7 +111,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -121,7 +121,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -1343,11 +1343,71 @@ public class ThirdPartyCompanyExample {
 			addCriterion("start_type not between", value1, value2, "startType");
 			return (Criteria) this;
 		}
+
+		public Criteria andPatentTypeIsNull() {
+			addCriterion("patent_type is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andPatentTypeIsNotNull() {
+			addCriterion("patent_type is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andPatentTypeEqualTo(Integer value) {
+			addCriterion("patent_type =", value, "patentType");
+			return (Criteria) this;
+		}
+
+		public Criteria andPatentTypeNotEqualTo(Integer value) {
+			addCriterion("patent_type <>", value, "patentType");
+			return (Criteria) this;
+		}
+
+		public Criteria andPatentTypeGreaterThan(Integer value) {
+			addCriterion("patent_type >", value, "patentType");
+			return (Criteria) this;
+		}
+
+		public Criteria andPatentTypeGreaterThanOrEqualTo(Integer value) {
+			addCriterion("patent_type >=", value, "patentType");
+			return (Criteria) this;
+		}
+
+		public Criteria andPatentTypeLessThan(Integer value) {
+			addCriterion("patent_type <", value, "patentType");
+			return (Criteria) this;
+		}
+
+		public Criteria andPatentTypeLessThanOrEqualTo(Integer value) {
+			addCriterion("patent_type <=", value, "patentType");
+			return (Criteria) this;
+		}
+
+		public Criteria andPatentTypeIn(List<Integer> values) {
+			addCriterion("patent_type in", values, "patentType");
+			return (Criteria) this;
+		}
+
+		public Criteria andPatentTypeNotIn(List<Integer> values) {
+			addCriterion("patent_type not in", values, "patentType");
+			return (Criteria) this;
+		}
+
+		public Criteria andPatentTypeBetween(Integer value1, Integer value2) {
+			addCriterion("patent_type between", value1, value2, "patentType");
+			return (Criteria) this;
+		}
+
+		public Criteria andPatentTypeNotBetween(Integer value1, Integer value2) {
+			addCriterion("patent_type not between", value1, value2, "patentType");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table third_party_company
-	 * @mbg.generated  Wed Oct 21 11:29:02 CST 2020
+	 * @mbg.generated  Thu Oct 22 16:26:31 CST 2020
 	 */
 	public static class Criterion {
 		private String condition;

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

@@ -3,6 +3,7 @@ package com.goafanti.customer.service.impl;
 import java.lang.reflect.InvocationTargetException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -178,13 +179,26 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		Map<String,Object> params = disposeParams(cli);
 		params.put("sort", sort);
 		params.put("sortType",sortType);
+		List<String> alist=new ArrayList<>();
 		if (type==0||TokenManager.hasRole(AFTConstants.SALESMAN)) {
 			params.put("power", 0);
 		}else if (TokenManager.hasRole(AFTConstants.SALESMAN_MANAGER)) {
 			params.put("power", 1);
+			alist=adminMapper.selectBySuperId(cli.getAid());
 		}else if (TokenManager.hasRole(AFTConstants.SALESMAN_DIRECTOR)) {
 			params.put("power", 2);
+			alist=adminMapper.selectBySuperId(cli.getAid());
+			List<String >alist2=new ArrayList<>();
+			if (!alist.isEmpty()) {
+				for (String string : alist) {
+					alist2.addAll(adminMapper.selectBySuperId(string));
+				}
+				alist.addAll(alist2);
+			}
+		}else if (TokenManager.hasRole(AFTConstants.CED)) {
+			params.put("power", 3);
 		}
+		params.put("alist", alist);
 		Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectPrivateOrganizationCustomerList","selectPrivateOrganizationCustomerCount",params,pageNo,pageSize);
 		List<CustomerListOut> tmpList = (List<CustomerListOut>)list.getList();
 		setCustomerList(tmpList,0,type);
@@ -517,6 +531,8 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		int followCount = userBusinessMapper.selectFollowCountByUAid(fbb.getUid(), TokenManager.getAdminId()) + 1;
 		userFollow.setFollowCount(followCount);
 		userFollowMapper.insert(userFollow);
+		//判断是跟进还是签单
+		int x=0;
 		//检查客户锁定情况
 		if(fbb.getUserBusinessList().size()>0){
 			boolean isUserOwner = false;
@@ -559,6 +575,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 					if (us.getFollowSituation()!=5&&ub.getFollowSituation()==5) {//如果改成已签合同,则锁定业务
 						if (StringUtils.isNotBlank(fbb.getUid())) ub.setUid(fbb.getUid());
 						lockProject(ub);//锁定客户业务
+						x=1;
 					}		
 					userBusiness.setBusinessProjectId(ub.getBusinessProjectId());
 					userBusiness.setCustomerStatus(ub.getCustomerStatus());
@@ -599,6 +616,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 					if (ub.getFollowSituation()==5) {//如果改成已签合同,则锁定业务
 						if (StringUtils.isNotBlank(fbb.getUid())) ub.setUid(fbb.getUid());
 						lockProject(ub);//锁定客户业务
+						x=1;
 					}
 					String ubId = UUID.randomUUID().toString();
 					//更新业务表
@@ -629,9 +647,32 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 				
 			}
 		}
+		followProject(fbb.getUid(),x);
 		return 1;
 	}
 
+	/**
+	 * 跟进更新用户中间表
+	 * @param ub
+	 */
+	private void followProject(String uid,int x) {
+		Date date =new Date();
+		String aid=TokenManager.getAdminId();
+		if (x==0) {
+			if (userLockReleaseMapper.updateUserMid(uid,aid,date,null)<1) {
+				userLockReleaseMapper.insertUserMid(uid,aid,date,null);
+			}
+		}else {
+			if (userLockReleaseMapper.updateUserMid(uid,aid,date,date)<1) {
+				userLockReleaseMapper.insertUserMid(uid,aid,date,date);
+			}
+		}
+	}
+	
+	/**
+	 * 锁定用户
+	 * @param ub
+	 */
 	private void lockProject(BusinessListBo ub) {
 		UserLockRelease ulr= new UserLockRelease();
 			ulr.setId(UUID.randomUUID().toString());
@@ -650,6 +691,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			}
 			ulr.setStatus(UserLockReleaseStatus.LOCKED.getCode());
 			ulr.setUid(ub.getUid());
+			
 			userLockReleaseMapper.insert(ulr);
 		}
 	

+ 19 - 1
src/main/java/com/goafanti/organization/bo/OutThirdPartyCompany.java

@@ -12,7 +12,7 @@ public class OutThirdPartyCompany  {
 	private String officialUnitPrice; 
 	private String reductionAmount;
 	
-
+	private Integer  patentType;
 
 	
 	
@@ -414,6 +414,24 @@ public class OutThirdPartyCompany  {
 	public void setStartType(Integer startType) {
 		this.startType = startType;
 	}
+
+
+
+
+
+
+	public Integer getPatentType() {
+		return patentType;
+	}
+
+
+
+
+
+
+	public void setPatentType(Integer patentType) {
+		this.patentType = patentType;
+	}
 	
 	
 

+ 6 - 6
src/main/java/com/goafanti/organization/service/impl/ThirdPartyCompanyServiceImpl.java

@@ -220,15 +220,15 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			outProjectBo op =null;
 			if(!list.isEmpty()) op=tOrderOutsourceMapper.selectByTid(tid);
 			//外包type
-			if (op!=null && op.getStartType()!=null&&op.getStartType()==1) {
 				for (OutThirdPartyCompany oc : list) {
-					if(op.getProjectType()==null)op.setProjectType(0);
-					if((op.getProjectType()==1&&oc.getType()==1)||(op.getProjectType()==2)) {
-						oc.setUnitPrice("***");
-						oc.setTotalAmount("***");
+					if (oc.getStartType()==1) {
+						if(op.getProjectType()==null)op.setProjectType(0);
+						if((op.getProjectType()==1&&oc.getType()==1)||(op.getProjectType()==2)||oc.getPatentType()==0) {
+							oc.setUnitPrice("***");
+							oc.setTotalAmount("***");
+						}
 					}
 				}
-			}
 		}
 		return list;
 	}

+ 1 - 1
src/main/resources/props/config_local.properties

@@ -5,7 +5,7 @@ jdbc.driverClassName=com.mysql.jdbc.Driver
 #jdbc.username=dev
 #jdbc.password=123456
 #测试
-jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+jdbc.url=jdbc:mysql://101.37.32.31:3306/aft20201022?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 jdbc.username=root
 jdbc.password=aftdev
 #\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e