Explorar o código

释放待开发

anderx %!s(int64=4) %!d(string=hai) anos
pai
achega
8ebfafd9f2
Modificáronse 23 ficheiros con 620 adicións e 767 borrados
  1. 1 1
      GeneratorConfig.xml
  2. 5 0
      src/main/java/com/goafanti/admin/service/impl/AttachmentServiceImpl.java
  3. 16 3
      src/main/java/com/goafanti/common/bo/userDaysBo.java
  4. 4 1
      src/main/java/com/goafanti/common/dao/UserChannelMapper.java
  5. 2 0
      src/main/java/com/goafanti/common/dao/UserLockReleaseMapper.java
  6. 1 1
      src/main/java/com/goafanti/common/dao/UserMapper.java
  7. 34 86
      src/main/java/com/goafanti/common/dao/UserTransferLogMapper.java
  8. 1 0
      src/main/java/com/goafanti/common/enums/AttachmentType.java
  9. 1 1
      src/main/java/com/goafanti/common/enums/NoticeStatus.java
  10. 41 2
      src/main/java/com/goafanti/common/mapper/UserChannelMapper.xml
  11. 7 5
      src/main/java/com/goafanti/common/mapper/UserLockReleaseMapper.xml
  12. 21 9
      src/main/java/com/goafanti/common/mapper/UserMapperExt.xml
  13. 37 187
      src/main/java/com/goafanti/common/mapper/UserTransferLogMapper.xml
  14. 216 232
      src/main/java/com/goafanti/common/model/UserTransferLog.java
  15. 86 62
      src/main/java/com/goafanti/common/task/ReleaseUserTask.java
  16. 7 0
      src/main/java/com/goafanti/customer/bo/InputListChannel.java
  17. 7 0
      src/main/java/com/goafanti/customer/bo/transferListBo.java
  18. 19 17
      src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java
  19. 6 1
      src/main/java/com/goafanti/customer/service/CustomerService.java
  20. 18 4
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java
  21. 62 2
      src/main/java/com/goafanti/user/controller/UserChannelApiController.java
  22. 5 4
      src/main/java/com/goafanti/user/service/UserChannelService.java
  23. 23 149
      src/main/java/com/goafanti/user/service/impl/UserChannelServiceImpl.java

+ 1 - 1
GeneratorConfig.xml

@@ -43,7 +43,7 @@
     <property name="enableSubPackages" value="false"/>
      <property name="nullCatalogMeansCurrent" value="true"/>
     </javaClientGenerator>
-    <table schema="aft" tableName="user_channel"   enableCountByExample="false"
+    <table schema="aft" tableName="user_transfer_log"   enableCountByExample="false"
                enableUpdateByExample="false"
                enableDeleteByExample="false"
                enableSelectByExample="false"

+ 5 - 0
src/main/java/com/goafanti/admin/service/impl/AttachmentServiceImpl.java

@@ -27,6 +27,11 @@ public class AttachmentServiceImpl implements AttachmentService {
 			a.setFileName("模板.xls");
 			a.setFilePath("/tmp/receivbles_template.xls");
 			return a;
+		}else if (sign.equals("user_channel")) {
+			Attachment a=new Attachment();
+			a.setFileName("模板.xls");
+			a.setFilePath("/tmp/user_channel.xls");
+			return a;
 		}
 		return null;
 	}

+ 16 - 3
src/main/java/com/goafanti/common/bo/userDaysBo.java

@@ -1,29 +1,42 @@
 package com.goafanti.common.bo;
 
 public class userDaysBo {
-	
+
 	private String uid;
 	private String aid;
 	private String name;
+	private Integer type;
+
 	public String getUid() {
 		return uid;
 	}
+
 	public void setUid(String uid) {
 		this.uid = uid;
 	}
+
 	public String getAid() {
 		return aid;
 	}
+
 	public void setAid(String aid) {
 		this.aid = aid;
 	}
+
 	public String getName() {
 		return name;
 	}
+
 	public void setName(String name) {
 		this.name = name;
 	}
-	
-	
+
+	public Integer getType() {
+		return type;
+	}
+
+	public void setType(Integer type) {
+		this.type = type;
+	}
 
 }

+ 4 - 1
src/main/java/com/goafanti/common/dao/UserChannelMapper.java

@@ -59,7 +59,10 @@ public interface UserChannelMapper {
 
 	void insertBatch(List<InputUserChannel> list);
 
-	List<OutUserChannel> selectByAidAndstatus(@Param("aid")String aid, @Param("status")Integer status);
+
+	void updateByuids(@Param("list")List<String> list, @Param("status")Integer status);
+
+	int deleteByIds(List<String> list);
 
 
 }

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

@@ -137,4 +137,6 @@ public interface UserLockReleaseMapper {
 
 	void updateByAidAndUid(@Param("aid")String aid, @Param("uid")String uid);
 
+	List<userDaysBo> selectChannelUserDays(Integer z);
+
 }

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

@@ -229,7 +229,7 @@ public interface UserMapper {
 
 	List<CustomerSimpleBo> selectPrivateCustomerByName(@Param("name")String name,@Param("aid")String aid);
 
-	List<CustomerSimpleBo> selectSignedCustomerByName(@Param("name")String name,@Param("aid")String aid);
+	List<CustomerSimpleBo> selectSignedCustomerByName(@Param("name")String name,@Param("aid")String aid,@Param("type")Integer type);
 	
 	List<User> selectUserByRoleName(@Param("roleName1")String roleName1,@Param("roleName2")String roleName2);
 	

+ 34 - 86
src/main/java/com/goafanti/common/dao/UserTransferLogMapper.java

@@ -10,92 +10,40 @@ import org.apache.ibatis.annotations.Param;
 
 public interface UserTransferLogMapper {
     /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_transfer_log
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    long countByExample(UserTransferLogExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_transfer_log
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    int deleteByExample(UserTransferLogExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_transfer_log
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    int deleteByPrimaryKey(Integer id);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_transfer_log
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    int insert(UserTransferLog record);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_transfer_log
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    int insertSelective(UserTransferLog record);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_transfer_log
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    List<UserTransferLog> selectByExample(UserTransferLogExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_transfer_log
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    UserTransferLog selectByPrimaryKey(Integer id);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_transfer_log
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    int updateByExampleSelective(@Param("record") UserTransferLog record, @Param("example") UserTransferLogExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_transfer_log
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    int updateByExample(@Param("record") UserTransferLog record, @Param("example") UserTransferLogExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_transfer_log
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    int updateByPrimaryKeySelective(UserTransferLog record);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table user_transfer_log
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    int updateByPrimaryKey(UserTransferLog record);
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_transfer_log
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_transfer_log
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	int insert(UserTransferLog record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_transfer_log
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	int insertSelective(UserTransferLog record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_transfer_log
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	UserTransferLog selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_transfer_log
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	int updateByPrimaryKeySelective(UserTransferLog record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_transfer_log
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	int updateByPrimaryKey(UserTransferLog record);
 
 	List<transferListBo> selectByUidGetList(String uid);
 

+ 1 - 0
src/main/java/com/goafanti/common/enums/AttachmentType.java

@@ -41,6 +41,7 @@ public enum AttachmentType {
 	DEMAND_TEMPLATE("demand_template", "科技需求批量导入模板"),
 	ACHIEVEMENT_TEMPLATE("achievement_template", "科技成果批量导入模板"),
 	RECEIVABLES_TEMPLATE("receivbles_template", "收款批量导入模板"),
+	USER_CHANNEL("user_channel", "渠道客户导入模板"),
 	DEMAND_ORDER_FILE("demand_order_file", "科技需求意向单/交易单附件"),
 	DEMAND_COVER_PICTURE("demand_cover_picture","科技需求封面图"),
 	BANNERS_PIC("banners", "广告图片"),

+ 1 - 1
src/main/java/com/goafanti/common/enums/NoticeStatus.java

@@ -54,7 +54,7 @@ public enum NoticeStatus {
 	PAYMENT_NO(45,"付款驳回通知"),
 	PAYMENT_YES(46,"付款通过通知"),
 	PAYMENT_COMPLETE(47,"财务付款通知"),
-	CUSTOMER_PRIVATE_REMINDER(48,"客户私有提醒"),
+	CUSTOMER_PRIVATE_REMINDER(48,"客户丢失提醒"),
 	OTHER(0, "其他");
 
 	private NoticeStatus(Integer code, String desc) {

+ 41 - 2
src/main/java/com/goafanti/common/mapper/UserChannelMapper.xml

@@ -153,13 +153,52 @@
     </foreach>
     </insert>
     
-    <select id="selectByAidAndstatus" resultType="com.goafanti.user.bo.OutUserChannel">
+    <select id="selectByAidAndstatusList" resultType="com.goafanti.user.bo.OutUserChannel">
  	   select a.id,a.uid,b.nickname userName,a.aid,a.status,date_format(a.distribution_time,'%Y-%m-%d %H:%i:%S')distributionTimes,
  	date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimes ,c.contacts ,c.contact_mobile contactMobile,
  	b.society_tag societyTag ,d1.name province,d2.name city from user_channel a
     left join user b on a.uid=b.id  left join organization_identity c on a.uid =c.uid 
     left join district_glossory d1 on c.location_province =d1.id 
     left join district_glossory d2 on c.location_city =d2.id
-    where a.aid= #{aid} and a.status =#{status};
+    where 1=1
+    <if test="aid !=null">
+    and a.aid= #{aid} 
+    </if>
+    <if test="status !=null">
+    and a.status =#{status}
+    </if>
+    <if test="page_sql != null">
+    	${page_sql}
+    </if>
     </select>
+    
+    <select id="selectByAidAndstatusCount" resultType="java.lang.Integer">
+ 	   select count(*) from user_channel a
+    left join user b on a.uid=b.id  left join organization_identity c on a.uid =c.uid 
+    left join district_glossory d1 on c.location_province =d1.id 
+    left join district_glossory d2 on c.location_city =d2.id
+    where 1=1
+    <if test="aid !=null">
+    and a.aid= #{aid} 
+    </if>
+    <if test="status !=null">
+    and a.status =#{status}
+    </if>
+    
+    </select>
+    <update id="updateByuids">
+     update user_channel set status = #{status}
+	where uid in( 
+      <foreach item="item" index="index" collection="list" separator=",">
+      #{item}
+    </foreach>
+      )
+    </update>
+    <delete id="deleteByIds">
+    delete from user_channel where id in (
+      <foreach item="item" index="index" collection="list" separator=",">
+      #{item}
+    </foreach>
+    )
+    </delete>
 </mapper>

+ 7 - 5
src/main/java/com/goafanti/common/mapper/UserLockReleaseMapper.xml

@@ -450,11 +450,7 @@
   </select>
   
   <select id="selectUserDays" resultType="com.goafanti.common.bo.userDaysBo">
-  
-  select 
-		t0.uid,
-		t0.aid,
-		u.nickname name
+  select  t0.uid, t0.aid, u.nickname name ,1 type
 	from
 		(select id,uid,aid,lock_time from user_lock_release where aid = #{aid} and type = 0 and status = 0)t0
 	left join 
@@ -462,7 +458,13 @@
 	on t0.uid = t1.uid 
 	left join user u on t0.uid=u.id
 	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>
   
+    <select id="selectChannelUserDays" resultType="com.goafanti.common.bo.userDaysBo">
+  	select a.id uid,a.aid,a.nickname name,2 type from user a 
+		left join user_channel b on a.id=b.uid 
+		where a.channel=1 and b.status =2 
+		 and a.share_type =0 and datediff(now(),b.create_time) &gt; #{z}
   </select>
   
   

+ 21 - 9
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -603,7 +603,7 @@
 			dg2.name as city, 
 			dg3.name as area,
 			c.name as industry,
-			if(isnull(uc.status),0,1) channel,
+			a.channel,
 			d.name as adminName
 		from user a 
 		left join organization_identity b on a.id = b.uid
@@ -616,6 +616,9 @@
 		<if test="aid != null and aid != ''">
 			and a.aid = #{aid}
 		</if>
+		<if test="channel !=null">
+			and a.channel= #{channel}
+		</if>
 		<if test="name != null and name != ''">
 			and a.identify_name like concat('%',#{name},'%')
 		</if>
@@ -650,6 +653,9 @@
 		<if test="aid != null and aid != ''">
 			and a.aid = #{aid}
 		</if>
+		<if test="channel !=null">
+			and a.channel= #{channel}
+		</if>
 		<if test="name != null and name != ''">
 			and a.identify_name like concat('%',#{name},'%')
 		</if>
@@ -1630,9 +1636,9 @@
 			where b.status != 1 and b.identify_name like concat('%',#{name},'%')
     </select>
     
-    <select id="selectSignedCustomerByName" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerSimpleBo">
+    <select id="selectSignedCustomerByName"  resultType="com.goafanti.customer.bo.CustomerSimpleBo">
    	 	select b.id,b.identify_name as name from user b  
-	where b.status != 1 and b.share_type =2 
+	where b.status != 1 and b.share_type = #{type}
 	and b.aid = #{aid}  and b.identify_name like concat('%',#{name},'%')
     </select>
     
@@ -2065,10 +2071,10 @@ inner join(
 	</update>
 	
 	<insert id="insertBatch" parameterType="com.goafanti.user.bo.InputUserChannel">
-    INSERT INTO `user` (id, mobile, password, nickname,share_type,type,society_tag)VALUES
+    INSERT INTO `user` (id, mobile, password, nickname,share_type,type,society_tag,aid,channel)VALUES
       <foreach item="item" index="index" collection="list" separator=",">
       (#{item.uid,jdbcType=VARCHAR}, #{item.contactMobile,jdbcType=VARCHAR}, #{item.password,jdbcType=VARCHAR}, 
-      #{item.userName,jdbcType=DECIMAL}, #{item.shareType,jdbcType=TIMESTAMP}, 1,#{item.societyTag})
+      #{item.userName,jdbcType=DECIMAL}, #{item.shareType,jdbcType=TIMESTAMP}, 1,#{item.societyTag},#{item.aid},1)
     </foreach>
   </insert>
   
@@ -2080,9 +2086,12 @@ inner join(
     left join district_glossory d1 on c.location_province =d1.id 
     left join district_glossory d2 on c.location_city =d2.id
     left join admin e on a.aid =e.id
-    where a.status in(0,2)
+    where a.status in (0,2)
+    <if test="status !=null">
+    and a.status = #{status}
+    </if>
     <if test="aid!=null">
-    and a.aid= #{aid}
+    and b.aid= #{aid}
     </if>
     <if test="province !=null">
     and  c.location_province= #{province}
@@ -2106,9 +2115,12 @@ inner join(
     left join district_glossory d1 on c.location_province =d1.id 
     left join district_glossory d2 on c.location_city =d2.id
     left join admin e on a.aid =e.id
-     where a.status in(0,2)
+    where a.status in(0,2)=1
+    <if test="status !=null">
+    and a.status = #{status}
+    </if>
     <if test="aid!=null">
-    and a.aid= #{aid}
+    and b.aid= #{aid}
     </if>
     <if test="province !=null">
     and  c.location_province= #{province}

+ 37 - 187
src/main/java/com/goafanti/common/mapper/UserTransferLogMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 09 11:39:03 CST 2020.
+      This element was generated on Fri Apr 23 09:38:20 CST 2021.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="uid" jdbcType="VARCHAR" property="uid" />
@@ -14,107 +14,21 @@
     <result column="take_aid" jdbcType="VARCHAR" property="takeAid" />
     <result column="type" jdbcType="INTEGER" property="type" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
   </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 Thu Apr 09 11:39:03 CST 2020.
-    -->
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 09 11:39:03 CST 2020.
-    -->
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
   <sql id="Base_Column_List">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 09 11:39:03 CST 2020.
+      This element was generated on Fri Apr 23 09:38:20 CST 2021.
     -->
-    id, uid, aid, pid, take_aid, type, create_time
+    id, `uid`, aid, pid, take_aid, `type`, create_time, remarks
   </sql>
-  <select id="selectByExample" parameterType="com.goafanti.common.model.UserTransferLogExample" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 09 11:39:03 CST 2020.
-    -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from user_transfer_log
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 09 11:39:03 CST 2020.
+      This element was generated on Fri Apr 23 09:38:20 CST 2021.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -125,40 +39,29 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 09 11:39:03 CST 2020.
+      This element was generated on Fri Apr 23 09:38:20 CST 2021.
     -->
     delete from user_transfer_log
     where id = #{id,jdbcType=INTEGER}
   </delete>
-  <delete id="deleteByExample" parameterType="com.goafanti.common.model.UserTransferLogExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 09 11:39:03 CST 2020.
-    -->
-    delete from user_transfer_log
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.UserTransferLog">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 09 11:39:03 CST 2020.
+      This element was generated on Fri Apr 23 09:38:20 CST 2021.
     -->
-    insert into user_transfer_log (id, uid, aid, 
-      pid, take_aid, type, 
-      create_time)
+    insert into user_transfer_log (id, `uid`, aid, 
+      pid, take_aid, `type`, 
+      create_time, remarks)
     values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
       #{pid,jdbcType=VARCHAR}, #{takeAid,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
-      #{createTime,jdbcType=TIMESTAMP})
+      #{createTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.UserTransferLog">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 09 11:39:03 CST 2020.
+      This element was generated on Fri Apr 23 09:38:20 CST 2021.
     -->
     insert into user_transfer_log
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -166,7 +69,7 @@
         id,
       </if>
       <if test="uid != null">
-        uid,
+        `uid`,
       </if>
       <if test="aid != null">
         aid,
@@ -178,11 +81,14 @@
         take_aid,
       </if>
       <if test="type != null">
-        type,
+        `type`,
       </if>
       <if test="createTime != null">
         create_time,
       </if>
+      <if test="remarks != null">
+        remarks,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -206,81 +112,21 @@
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="remarks != null">
+        #{remarks,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.goafanti.common.model.UserTransferLogExample" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 09 11:39:03 CST 2020.
-    -->
-    select count(*) from user_transfer_log
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 09 11:39:03 CST 2020.
-    -->
-    update user_transfer_log
-    <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=INTEGER},
-      </if>
-      <if test="record.uid != null">
-        uid = #{record.uid,jdbcType=VARCHAR},
-      </if>
-      <if test="record.aid != null">
-        aid = #{record.aid,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pid != null">
-        pid = #{record.pid,jdbcType=VARCHAR},
-      </if>
-      <if test="record.takeAid != null">
-        take_aid = #{record.takeAid,jdbcType=VARCHAR},
-      </if>
-      <if test="record.type != null">
-        type = #{record.type,jdbcType=INTEGER},
-      </if>
-      <if test="record.createTime != null">
-        create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      </if>
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 09 11:39:03 CST 2020.
-    -->
-    update user_transfer_log
-    set id = #{record.id,jdbcType=INTEGER},
-      uid = #{record.uid,jdbcType=VARCHAR},
-      aid = #{record.aid,jdbcType=VARCHAR},
-      pid = #{record.pid,jdbcType=VARCHAR},
-      take_aid = #{record.takeAid,jdbcType=VARCHAR},
-      type = #{record.type,jdbcType=INTEGER},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserTransferLog">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 09 11:39:03 CST 2020.
+      This element was generated on Fri Apr 23 09:38:20 CST 2021.
     -->
     update user_transfer_log
     <set>
       <if test="uid != null">
-        uid = #{uid,jdbcType=VARCHAR},
+        `uid` = #{uid,jdbcType=VARCHAR},
       </if>
       <if test="aid != null">
         aid = #{aid,jdbcType=VARCHAR},
@@ -292,11 +138,14 @@
         take_aid = #{takeAid,jdbcType=VARCHAR},
       </if>
       <if test="type != null">
-        type = #{type,jdbcType=INTEGER},
+        `type` = #{type,jdbcType=INTEGER},
       </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="remarks != null">
+        remarks = #{remarks,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -304,20 +153,21 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 09 11:39:03 CST 2020.
+      This element was generated on Fri Apr 23 09:38:20 CST 2021.
     -->
     update user_transfer_log
-    set uid = #{uid,jdbcType=VARCHAR},
+    set `uid` = #{uid,jdbcType=VARCHAR},
       aid = #{aid,jdbcType=VARCHAR},
       pid = #{pid,jdbcType=VARCHAR},
       take_aid = #{takeAid,jdbcType=VARCHAR},
-      type = #{type,jdbcType=INTEGER},
-      create_time = #{createTime,jdbcType=TIMESTAMP}
+      `type` = #{type,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      remarks = #{remarks,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
   <select id="selectByUidGetList" resultType="com.goafanti.customer.bo.transferListBo">
 	select a.id,a.type,b.nickname userName,c.name usedAName,d.name newAName,e.bname Pname, 
-  	date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as createDate
+  	date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as createDate,remarks
   	from user_transfer_log a left join user b on a.uid=b.id
 	left join admin c on a.aid=c.id left join admin d on a.take_aid=d.id
 	left join business_project e on a.pid=e.id 
@@ -327,13 +177,13 @@
   
    <insert id="insertList">
     insert into user_transfer_log ( uid, aid, 
-      pid, take_aid, type, 
+      pid, take_aid, type, remarks,
       create_time)
     values 
-    <foreach item="item" collection="list" separator="," index="">
+    <foreach collection="list" index="" item="item" separator=",">
     ( #{item.uid,jdbcType=VARCHAR}, #{item.aid,jdbcType=VARCHAR}, 
       #{item.pid,jdbcType=VARCHAR}, #{item.takeAid,jdbcType=VARCHAR}, #{item.type,jdbcType=INTEGER}, 
-      #{item.createTime,jdbcType=TIMESTAMP})
+      #{item.remarks},#{item.createTime,jdbcType=TIMESTAMP})
      </foreach>
   </insert>
   
@@ -342,9 +192,9 @@
       type, 
       create_time)
     values 
-    <foreach item="item" collection="list" separator="," index="">
+    <foreach collection="list" index="" item="item" separator=",">
     ( #{item.uid,jdbcType=VARCHAR}, #{item.aid,jdbcType=VARCHAR}, 
-     1, 
+     8, 
       #{item.createTime,jdbcType=TIMESTAMP})
      </foreach>
   </insert>

+ 216 - 232
src/main/java/com/goafanti/common/model/UserTransferLog.java

@@ -1,236 +1,220 @@
 package com.goafanti.common.model;
 
 import java.util.Date;
-
-public class UserTransferLog {
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column user_transfer_log.id
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    private Integer id;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column user_transfer_log.uid
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    private String uid;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column user_transfer_log.aid
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    private String aid;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column user_transfer_log.pid
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    private String pid;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column user_transfer_log.take_aid
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    private String takeAid;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column user_transfer_log.type
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    private Integer type;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column user_transfer_log.create_time
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    private Date createTime;
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column user_transfer_log.id
-     *
-     * @return the value of user_transfer_log.id
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    public Integer getId() {
-        return id;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column user_transfer_log.id
-     *
-     * @param id the value for user_transfer_log.id
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column user_transfer_log.uid
-     *
-     * @return the value of user_transfer_log.uid
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    public String getUid() {
-        return uid;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column user_transfer_log.uid
-     *
-     * @param uid the value for user_transfer_log.uid
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    public void setUid(String uid) {
-        this.uid = uid;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column user_transfer_log.aid
-     *
-     * @return the value of user_transfer_log.aid
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    public String getAid() {
-        return aid;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column user_transfer_log.aid
-     *
-     * @param aid the value for user_transfer_log.aid
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    public void setAid(String aid) {
-        this.aid = aid;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column user_transfer_log.pid
-     *
-     * @return the value of user_transfer_log.pid
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    public String getPid() {
-        return pid;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column user_transfer_log.pid
-     *
-     * @param pid the value for user_transfer_log.pid
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    public void setPid(String pid) {
-        this.pid = pid;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column user_transfer_log.take_aid
-     *
-     * @return the value of user_transfer_log.take_aid
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    public String getTakeAid() {
-        return takeAid;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column user_transfer_log.take_aid
-     *
-     * @param takeAid the value for user_transfer_log.take_aid
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    public void setTakeAid(String takeAid) {
-        this.takeAid = takeAid;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column user_transfer_log.type
-     *
-     * @return the value of user_transfer_log.type
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    public Integer getType() {
-        return type;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column user_transfer_log.type
-     *
-     * @param type the value for user_transfer_log.type
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    public void setType(Integer type) {
-        this.type = type;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column user_transfer_log.create_time
-     *
-     * @return the value of user_transfer_log.create_time
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column user_transfer_log.create_time
-     *
-     * @param createTime the value for user_transfer_log.create_time
-     *
-     * @mbg.generated Thu Apr 09 11:39:03 CST 2020
-     */
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
+import java.io.Serializable;
+
+public class UserTransferLog implements Serializable {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_transfer_log.id
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_transfer_log.uid
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	private String uid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_transfer_log.aid
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	private String aid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_transfer_log.pid
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	private String pid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_transfer_log.take_aid
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	private String takeAid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_transfer_log.type
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	private Integer type;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_transfer_log.create_time
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_transfer_log.remarks
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	private String remarks;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table user_transfer_log
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_transfer_log.id
+	 * @return  the value of user_transfer_log.id
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_transfer_log.id
+	 * @param id  the value for user_transfer_log.id
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_transfer_log.uid
+	 * @return  the value of user_transfer_log.uid
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	public String getUid() {
+		return uid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_transfer_log.uid
+	 * @param uid  the value for user_transfer_log.uid
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	public void setUid(String uid) {
+		this.uid = uid == null ? null : uid.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_transfer_log.aid
+	 * @return  the value of user_transfer_log.aid
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	public String getAid() {
+		return aid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_transfer_log.aid
+	 * @param aid  the value for user_transfer_log.aid
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	public void setAid(String aid) {
+		this.aid = aid == null ? null : aid.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_transfer_log.pid
+	 * @return  the value of user_transfer_log.pid
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	public String getPid() {
+		return pid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_transfer_log.pid
+	 * @param pid  the value for user_transfer_log.pid
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	public void setPid(String pid) {
+		this.pid = pid == null ? null : pid.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_transfer_log.take_aid
+	 * @return  the value of user_transfer_log.take_aid
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	public String getTakeAid() {
+		return takeAid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_transfer_log.take_aid
+	 * @param takeAid  the value for user_transfer_log.take_aid
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	public void setTakeAid(String takeAid) {
+		this.takeAid = takeAid == null ? null : takeAid.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_transfer_log.type
+	 * @return  the value of user_transfer_log.type
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	public Integer getType() {
+		return type;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_transfer_log.type
+	 * @param type  the value for user_transfer_log.type
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	public void setType(Integer type) {
+		this.type = type;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_transfer_log.create_time
+	 * @return  the value of user_transfer_log.create_time
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_transfer_log.create_time
+	 * @param createTime  the value for user_transfer_log.create_time
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_transfer_log.remarks
+	 * @return  the value of user_transfer_log.remarks
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	public String getRemarks() {
+		return remarks;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_transfer_log.remarks
+	 * @param remarks  the value for user_transfer_log.remarks
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	public void setRemarks(String remarks) {
+		this.remarks = remarks == null ? null : remarks.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_transfer_log
+	 * @mbg.generated  Fri Apr 23 09:38:20 CST 2021
+	 */
+	@Override
+	public String toString() {
+		StringBuilder sb = new StringBuilder();
+		sb.append(getClass().getSimpleName());
+		sb.append(" [");
+		sb.append("Hash = ").append(hashCode());
+		sb.append(", id=").append(id);
+		sb.append(", uid=").append(uid);
+		sb.append(", aid=").append(aid);
+		sb.append(", pid=").append(pid);
+		sb.append(", takeAid=").append(takeAid);
+		sb.append(", type=").append(type);
+		sb.append(", createTime=").append(createTime);
+		sb.append(", remarks=").append(remarks);
+		sb.append(", serialVersionUID=").append(serialVersionUID);
+		sb.append("]");
+		return sb.toString();
+	}
 }

+ 86 - 62
src/main/java/com/goafanti/common/task/ReleaseUserTask.java

@@ -34,21 +34,22 @@ import com.goafanti.user.service.UserService;
 @Controller
 public class ReleaseUserTask {
 	@Resource
-	private CustomerService customerServiceImpl;
+	private CustomerService customerService;
 	@Resource
-	private UserService userServiceImpl;
+	private UserService userService;
 	@Autowired
-	private NoticeMapper	noticeMapper;
-	
-	int pointsDataLimit=50;
-	
+	private NoticeMapper noticeMapper;
+
+	int pointsDataLimit = 50;
+
 	/**
-	 *   每天凌晨一点
+	 * 每天凌晨一点
+	 * 
 	 * @throws InterruptedException
 	 */
 //	@Scheduled(cron = "0 55 15  * * ?")
 	@Scheduled(cron = "0 0 1  * * ?")
-	public void startTask()  {
+	public void startTask() {
 		try {
 			pushUserDays();
 			Thread.sleep(2000);
@@ -56,86 +57,109 @@ public class ReleaseUserTask {
 		} catch (InterruptedException e) {
 			e.printStackTrace();
 		}
-		
+
 	}
-	
+
 	@RequestMapping(value = "/open/remindUser", method = RequestMethod.GET)
 	private void pushUserDays() throws InterruptedException {
 		LoggerUtils.debug(getClass(), "==============客户提醒开始============");
-		List<User> userList = userServiceImpl.selectUserByRoleName("营销员","营销经理");
+		List<User> userList = userService.selectUserByRoleName("营销员", "营销经理");
 		List<userDaysBo> count = new ArrayList<>();
 		List<userDaysBo> userTmpList = null;
-		for(User u : userList){
-			if(StringUtils.isNotBlank(u.getId())) {
-				userTmpList = customerServiceImpl.selectUserDays(u.getId());
+		for (User u : userList) {
+			if (StringUtils.isNotBlank(u.getId())) {
+				userTmpList = customerService.selectUserDays(u.getId());
 			}
-			if(!userTmpList.isEmpty())count.addAll(userTmpList);
+			if (!userTmpList.isEmpty())
+				count.addAll(userTmpList);
 		}
-		List<Notice> ln=new ArrayList<>();
+		List<userDaysBo> userChannelList = customerService.selectChannelUserDays(0);
+		if (!userChannelList.isEmpty())
+			count.addAll(userChannelList);
+		List<Notice> ln = new ArrayList<>();
 		for (userDaysBo ub : count) {
-			ln.add(new Notice(UUID.randomUUID().toString(),new Date(),0,
-				ub.getAid(),NoticeStatus.CUSTOMER_PRIVATE_REMINDER.getCode(),"您的客户:"+ub.getName()+",剩余天数不足十五天,请及时跟进或者限时签单!"));
+			String str = String.format("您的%s客户【%s】剩余天数不足十五天,请及时跟进或者限时签单!", ub.getType() == 1 ? "私有" : "渠道",
+					ub.getName());
+			ln.add(new Notice(UUID.randomUUID().toString(), new Date(), 0, ub.getAid(),
+					NoticeStatus.CUSTOMER_PRIVATE_REMINDER.getCode(), str));
 		}
-		List<Notice> newList=new ArrayList<>();
-		 if (ln!=null&&ln.size()>0) {
-			  for(int i=0;i<ln.size();i++){
-				  newList.add(ln.get(i));
-				  if(pointsDataLimit == newList.size()||i == ln.size()-1){
-					  if(newList.size()>0) noticeMapper.insertBatch(newList);
-					  newList.clear();
-					  Thread.sleep(2000);
-				  }  
-			  }
+		List<Notice> newList = new ArrayList<>();
+		if (ln != null && ln.size() > 0) {
+			for (int i = 0; i < ln.size(); i++) {
+				newList.add(ln.get(i));
+				if (pointsDataLimit == newList.size() || i == ln.size() - 1) {
+					if (newList.size() > 0)
+						noticeMapper.insertBatch(newList);
+					newList.clear();
+					Thread.sleep(2000);
+				}
+			}
 		}
-		 LoggerUtils.debug(getClass(), "==============客户提醒结束============");
+		LoggerUtils.debug(getClass(), "==============客户提醒结束============");
 	}
 
-
 	/**
-	 *将客户和业务转为待释放
+	 * 将客户和业务转为待释放
 	 */
 	@RequestMapping(value = "/open/updateUser", method = RequestMethod.GET)
-	public void updateUser(){
+	public void updateUser() {
 		LoggerUtils.debug(getClass(), "==============客户释放开始============");
 		Date releaseTime = new Date();
 		try {
-			List<User> userList = userServiceImpl.selectUserByRoleName("营销员","营销经理");
+			List<User> userList = userService.selectUserByRoleName("营销员", "营销经理");
 			List<LockingReleaseBo> lockUserList = new ArrayList<LockingReleaseBo>();
 			List<LockingReleaseBo> userTmpList = null;
 			List<LockingReleaseBo> userTmpList2 = null;
-			if (userList!=null&&!userList.isEmpty()) {
-				for(User u : userList){
-					if(StringUtils.isNotBlank(u.getId())) {
-						//获取30天释放
-						userTmpList = customerServiceImpl.selectWaitReleaseCustomer(u.getId(),0);
-						//获取270天释放
-						userTmpList2 = customerServiceImpl.selectWaitReleaseCustomer(u.getId(),1);
-						customerServiceImpl.pushReleaseLog(userTmpList,0);
-						customerServiceImpl.pushReleaseLog(userTmpList2,1);
-						if(userTmpList!=null&&!userTmpList.isEmpty())lockUserList.addAll(userTmpList);
-						if(userTmpList2!=null&&!userTmpList2.isEmpty())lockUserList.addAll(userTmpList2);
+			if (userList != null && !userList.isEmpty()) {
+				for (User u : userList) {
+					if (StringUtils.isNotBlank(u.getId())) {
+						// 获取30天释放
+						userTmpList = customerService.selectWaitReleaseCustomer(u.getId(), 0);
+						// 获取270天释放
+						userTmpList2 = customerService.selectWaitReleaseCustomer(u.getId(), 1);
+						customerService.pushReleaseLog(userTmpList, 0);
+						customerService.pushReleaseLog(userTmpList2, 1);
+						if (userTmpList != null && !userTmpList.isEmpty())
+							lockUserList.addAll(userTmpList);
+						if (userTmpList2 != null && !userTmpList2.isEmpty())
+							lockUserList.addAll(userTmpList2);
+					}
+				}
+			}
+			List<LockingReleaseBo> newList = new ArrayList<LockingReleaseBo>();
+			if (lockUserList != null && lockUserList.size() > 0) {
+				for (int i = 0; i < lockUserList.size(); i++) {
+					newList.add(lockUserList.get(i));
+					if (pointsDataLimit == newList.size() || i == lockUserList.size() - 1) {
+						if (newList.size() > 0) {
+							customerService.updatePendingReleaseLock(newList);
 						}
+						newList.clear();
+						Thread.sleep(2000);
+					}
 				}
 			}
-		List<LockingReleaseBo> newList=new ArrayList<LockingReleaseBo>();
-			  if (lockUserList!=null&&lockUserList.size()>0) {
-				  for(int i=0;i<lockUserList.size();i++){
-					  newList.add(lockUserList.get(i));
-					  if(pointsDataLimit == newList.size()||i == lockUserList.size()-1){
-						  if(newList.size()>0) {
-							  customerServiceImpl.updatePendingReleaseLock(newList);
-						  }
-						  newList.clear();
-						  Thread.sleep(2000);
-					  }  
-				  }
+			// 获取90天渠道释放
+			List<userDaysBo> userChannelList = customerService.selectChannelUserDays(1);
+			List<userDaysBo> newCList=new ArrayList<>();
+			if (userChannelList != null && userChannelList.size() > 0) {
+				for (int i = 0; i < userChannelList.size(); i++) {
+					newCList.add(userChannelList.get(i));
+					if (pointsDataLimit == newCList.size() || i == lockUserList.size() - 1) {
+//						userService.releaseUserChannelList
+					}
+					newCList.clear();
+					Thread.sleep(2000);
+				}
 			}
-			List<LockingReleaseBo> lockList=customerServiceImpl.selectPendinglockUserList();
-			if (lockList.size()>0)customerServiceImpl.updateReleaseLock(releaseTime);
+			List<LockingReleaseBo> lockList = customerService.selectPendinglockUserList();
+			if (lockList.size() > 0)
+				customerService.updateReleaseLock(releaseTime);
 		} catch (Exception e) {
-			Notice n =new Notice(UUID.randomUUID().toString(),new Date(),0,"1",NoticeStatus.TASK_PATENT_ERROR.getCode(),"==============客户释放失败================");
-			 noticeMapper.insert(n);
-			EmailBo emailBo = new EmailBo( "释放客户失败",  AFTConstants.ADMIN_EMAIL,  "超管", "平台",  "系统", "释放客户失败");
+			Notice n = new Notice(UUID.randomUUID().toString(), new Date(), 0, "1",
+					NoticeStatus.TASK_PATENT_ERROR.getCode(), "==============客户释放失败================");
+			noticeMapper.insert(n);
+			EmailBo emailBo = new EmailBo("释放客户失败", AFTConstants.ADMIN_EMAIL, "超管", "平台", "系统", "释放客户失败");
 			try {
 				SendEmailUtil.getInstance().send(emailBo);
 			} catch (UnsupportedEncodingException | MessagingException e1) {
@@ -146,5 +170,5 @@ public class ReleaseUserTask {
 		}
 		LoggerUtils.debug(getClass(), "==============客户释放完成============");
 	}
-	
+
 }

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

@@ -5,6 +5,7 @@ public class InputListChannel {
 	private String name ;
 	private Integer province;
 	private Integer city;
+	private Integer status;
 	private String startTime;
 	private String endTime;
 	private Integer pageNo;
@@ -51,6 +52,12 @@ public class InputListChannel {
 	public void setPageSize(Integer pageSize) {
 		this.pageSize = pageSize;
 	}
+	public Integer getStatus() {
+		return status;
+	}
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
 	
 	
 }

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

@@ -8,6 +8,7 @@ public class transferListBo {
 	private String newAName;
 	private String pName;
 	private String createDate;
+	private String remarks;
 	public Integer getId() {
 		return id;
 	}
@@ -50,6 +51,12 @@ public class transferListBo {
 	public void setCreateDate(String createDate) {
 		this.createDate = createDate;
 	}
+	public String getRemarks() {
+		return remarks;
+	}
+	public void setRemarks(String remarks) {
+		this.remarks = remarks;
+	}
 	
 	
 }

+ 19 - 17
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -125,15 +125,7 @@ public class AdminCustomerApiController extends BaseApiController{
 		return res;
 	}
 	
-	/**
-	 *  渠道客户列表
-	 **/
-	@RequestMapping(value = "/listChannelCustomer" , method = RequestMethod.POST)
-	public Result listChannelCustomer(InputListChannel in){
-		Result res = new Result();
-		res.setData(customerService.listChannelCustomer(in));
-		return res;
-	}
+
 	
 	/** 跟进管理列表
 	 *  跟进列表
@@ -222,13 +214,7 @@ public class AdminCustomerApiController extends BaseApiController{
 		res.setData(customerService.customerHandOver( userIds , receiveId));
 		return res;
 	}
-	/** 渠道客户转交 **/
-	@RequestMapping(value = "/channelCustomerDeliver", method = RequestMethod.POST)
-	public Result channelCustomerDeliver(String userIds ,String receiveId,String remarks){
-		Result res = new Result();
-		res.setData(customerService.pushChannelDeliver( userIds , receiveId,remarks));
-		return res;
-	}
+
 	
 	/** 客户即时检索 **/
 	@RequestMapping(value = "/findCustomerByName",method = RequestMethod.GET)
@@ -249,7 +235,7 @@ public class AdminCustomerApiController extends BaseApiController{
 		if(name.length()<2) return res;
 		if(type == 0) res.setData(customerService.getPrivateCustomerByName(name));
 		if(type == 1) res.setData(customerService.getSignedCustomerByName(name));
-		if(type == 3) res.setData(customerService.getChannelCustomerByName(name));
+		if(type == 2) res.setData(customerService.getChannelCustomerByName(name));
 		return res;
 	}
 	
@@ -1276,7 +1262,23 @@ public class AdminCustomerApiController extends BaseApiController{
 		res.data(i);
 		return res;
 	}
+	/**
+	 *  渠道客户列表
+	 **/
+	@RequestMapping(value = "/listChannelCustomer" , method = RequestMethod.POST)
+	public Result listChannelCustomer(InputListChannel in){
+		Result res = new Result();
+		res.setData(customerService.listChannelCustomer(in));
+		return res;
+	}
 	
+	/** 渠道客户转交 **/
+	@RequestMapping(value = "/channelCustomerDeliver", method = RequestMethod.POST)
+	public Result channelCustomerDeliver(String userIds ,String receiveId,String remarks){
+		Result res = new Result();
+		res.setData(customerService.pushChannelDeliver( userIds , receiveId,remarks));
+		return res;
+	}
 }
 
 

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

@@ -515,6 +515,12 @@ public interface CustomerService {
 	int updatePrivateBusinessTransfer(String inputId, String uid, String pid);
 	int pushReleaseUser(String id);
 	List<userDaysBo> selectUserDays(String id);
+	/**
+	 * 
+	 * @param type 0提前15天 1达到
+	 * @return
+	 */
+	List<userDaysBo> selectChannelUserDays(Integer type);
 	
 	int addGuidance(String followId, String guidance);
 	/**
@@ -537,5 +543,4 @@ public interface CustomerService {
 	Object listChannelCustomer(InputListChannel in);
 	Object pushChannelDeliver(String userIds, String receiveId, String remarks);
 	Object getChannelCustomerByName(String name);
-	
 }

+ 18 - 4
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -39,6 +39,7 @@ import com.goafanti.common.dao.OrganizationIdentityMapper;
 import com.goafanti.common.dao.OrganizationSalesTargetMapper;
 import com.goafanti.common.dao.OrganizationYearProjectMapper;
 import com.goafanti.common.dao.UserBusinessMapper;
+import com.goafanti.common.dao.UserChannelMapper;
 import com.goafanti.common.dao.UserFollowBusinessMapper;
 import com.goafanti.common.dao.UserFollowMapper;
 import com.goafanti.common.dao.UserIdentityMapper;
@@ -131,6 +132,8 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	private OrganizationSalesTargetMapper	organizationSalesTargetMapper;
 	@Resource
 	private UserTransferLogMapper	userTransferLogMapper;
+	@Resource
+	private UserChannelMapper userChannelMapper;
 	@Value(value = "${upload.path}")
 	private String 					uploadPath 			= null;
 	
@@ -1580,11 +1583,11 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 
 	@Override
 	public List<CustomerSimpleBo> getSignedCustomerByName(String name) {
-		return userMapper.selectSignedCustomerByName(name,TokenManager.getAdminId());
+		return userMapper.selectSignedCustomerByName(name,TokenManager.getAdminId(),2);
 	}
 	@Override
 	public List<CustomerSimpleBo> getChannelCustomerByName(String name) {
-		return userMapper.selectSignedCustomerByName(name,TokenManager.getAdminId());
+		return userMapper.selectSignedCustomerByName(name,TokenManager.getAdminId(),3);
 	}
 	private int updateUserLock(String uid,String aid,Integer oldStatus,Integer newStatus){
 		return userLockReleaseMapper.updateUserLock(uid,aid,oldStatus,newStatus);
@@ -1849,7 +1852,12 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		List<userDaysBo> list=userLockReleaseMapper.selectUserDays(id,x,y);
 		return list;
 	}
-
+	@Override
+	public List<userDaysBo>	selectChannelUserDays(Integer type){
+		Integer days=90;
+		if(type==0)days-=USER_REMIND_DAYS;
+		return userLockReleaseMapper.selectChannelUserDays(days);
+	}
 	@Override
 	public int addGuidance(String followId, String guidance) {
 		UserFollow uf=new UserFollow();
@@ -1910,6 +1918,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		if (StringUtils.isNotBlank(in.getName()))params.put("name", in.getName());
 		if(in.getProvince()!=null)params.put("province", in.getProvince());
 		if(in.getCity()!=null)params.put("city", in.getCity());
+		if(in.getStatus()!=null)params.put("status", in.getStatus());
 		if(StringUtils.isNotBlank(in.getStartTime()))params.put("startTime", in.getStartTime());
 		if(StringUtils.isNotBlank(in.getEndTime()))params.put("endTime", in.getEndTime()+" 23:59:59");
 		if(!TokenManager.hasRole(AFTConstants.SALESMAN_DIRECTOR)&&!TokenManager.hasRole(AFTConstants.SUPERADMIN)){
@@ -1923,6 +1932,8 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	public Object pushChannelDeliver(String userIds, String receiveId,String remarks) {
 		String [] str=userIds.split(",");
 		List<String> uids=Arrays.asList(str);
+		int x=0;
+		if (TokenManager.hasRole(AFTConstants.SALESMAN_DIRECTOR))x=1;
 		Date date=new Date();
 		int  i=userMapper.updatechannelCustomerDeliver(uids, receiveId);
 		if (i>0) {
@@ -1932,12 +1943,15 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 				u.setAid(TokenManager.getAdminId());
 				u.setTakeAid(receiveId);
 				u.setUid(string);
-				u.setType(8);
+				if(x==0)u.setType(10);
+				else if(x==1)u.setType(9);
 				u.setCreateTime(date);
+				u.setRemarks(remarks);
 				l.add(u);
 			}
 			userTransferLogMapper.insertList(l);
 		}
+		if(x==1)userChannelMapper.updateByuids(uids,2);
 		return i;
 	}
 

+ 62 - 2
src/main/java/com/goafanti/user/controller/UserChannelApiController.java

@@ -12,11 +12,15 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 
+import com.goafanti.admin.service.AttachmentService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.enums.AttachmentType;
+import com.goafanti.common.model.Attachment;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.common.utils.excel.NewExcelUtil;
+import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.user.bo.InputUserChannel;
 import com.goafanti.user.bo.OutUserChannel;
 import com.goafanti.user.service.UserChannelService;
@@ -27,6 +31,8 @@ public class UserChannelApiController  extends CertifyApiController{
 	
 	@Resource
 	private UserChannelService 	userChannelService;
+	@Resource
+	private AttachmentService	attachmentService;
 	
 	
 	/**
@@ -45,6 +51,21 @@ public class UserChannelApiController  extends CertifyApiController{
 		return res;
 	}
 	
+	/**
+	 * 	删除渠道
+	 * 
+	 * @param uid
+	 * @return
+	 */
+	@RequestMapping(value = "/delete", method = RequestMethod.POST)
+	public Result delete(String ids) {
+		Result res = new Result();
+		if (StringUtils.isBlank(ids)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "编号"));
+		}
+		res.setData(userChannelService.delete(ids));
+		return res;
+	}
 
 	
 	/**
@@ -73,6 +94,19 @@ public class UserChannelApiController  extends CertifyApiController{
     
     
     /**
+  	 * 	已存在渠道客户列表
+       * 
+       * @param response
+       * @return
+       */
+      @RequestMapping(value = "/erorrList" , method = RequestMethod.GET)
+      public Result erorrList(Integer pageNo,Integer pageSize)  {
+    	  Result res =new Result();
+    	  res.data(userChannelService.getErorrList(pageNo,pageSize));
+  		 return  res;
+      	}
+    
+    /**
   	 * 	导出已存在渠道客户
        * 
        * @param response
@@ -80,11 +114,37 @@ public class UserChannelApiController  extends CertifyApiController{
        */
       @RequestMapping(value = "/export" , method = RequestMethod.GET)
       public Result exportReceivables(HttpServletResponse response)  {
-    	  List<OutUserChannel> list =userChannelService.getErorrList();
+    	  @SuppressWarnings("unchecked")
+		List<OutUserChannel> list =(List<OutUserChannel>) userChannelService.getErorrList(1,99999).getList();
       	NewExcelUtil<OutUserChannel>excel=new NewExcelUtil<>(OutUserChannel.class);
   		 return  excel.exportExcel(list,"渠道客户",response);
       	}
-	
+      /**
+  	 * 	下载回款批量导入Excel模板
+       * 
+       * @param response
+       * @return
+       */
+      @RequestMapping(value = "/downloadTemplate", method = RequestMethod.GET)
+      public Result downloadTemplateFile(HttpServletResponse response, String sign) {
+          Result res = new Result();
+          AttachmentType attachmentType = AttachmentType.getField(sign);
+          if (attachmentType == AttachmentType.USER_CHANNEL) {
+              String fileName = "";
+              Attachment af = attachmentService.selectByReceivbles(sign);
+              if (null == af) {
+                  res.getError().add(buildError(ErrorConstants.FILE_NON_EXISTENT, "", "找不到文件!"));
+              } else {
+                  String path = af.getFilePath();
+                  String suffix = path.substring(path.lastIndexOf("."));
+                  fileName = AttachmentType.USER_CHANNEL.getDesc() + suffix;
+                  downloadFile(response, fileName, path);
+              }
+          } else {
+              res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
+          }
+          return res;
+      }
 	
 
 }

+ 5 - 4
src/main/java/com/goafanti/user/service/UserChannelService.java

@@ -1,9 +1,9 @@
 package com.goafanti.user.service;
 
-import java.util.List;
 
 import org.springframework.web.multipart.MultipartFile;
 
+import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.user.bo.InputUserChannel;
 import com.goafanti.user.bo.OutUserChannel;
 
@@ -11,11 +11,12 @@ public interface UserChannelService {
 
 	Object add(InputUserChannel in);
 
-	int batchImport();
 
-	List<OutUserChannel> batchListReceivables(MultipartFile file);
+	Object batchListReceivables(MultipartFile file);
 
-	List<OutUserChannel> getErorrList();
+	Pagination<OutUserChannel> getErorrList(Integer pageNo, Integer pageSize);
+
+	Object delete(String ids);
 
 
 }

+ 23 - 149
src/main/java/com/goafanti/user/service/impl/UserChannelServiceImpl.java

@@ -1,8 +1,11 @@
 package com.goafanti.user.service.impl;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Calendar;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 
 import javax.annotation.Resource;
@@ -32,13 +35,14 @@ import com.goafanti.common.model.User;
 import com.goafanti.common.utils.ExcelUtils;
 import com.goafanti.common.utils.PasswordUtil;
 import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.user.bo.InputUserChannel;
 import com.goafanti.user.bo.OutUserChannel;
 import com.goafanti.user.service.UserChannelService;
 
 @Service
-public class UserChannelServiceImpl extends BaseMybatisDao<UserCareerMapper> implements UserChannelService{
+public class UserChannelServiceImpl extends BaseMybatisDao<UserChannelMapper> implements UserChannelService{
 
 	@Autowired
 	private UserMapper userMapper;
@@ -73,152 +77,10 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserCareerMapper> imp
 		return 1;
 	}
 
-	@Override
-	public int batchImport() {
-//		List<TemporaryReceivables> list=userChannelMapper.selectByaid(TokenManager.getAdminId());
-//		if(list.size()>99)throw new BusinessException(new Error("数量过大,建议不超过99。"));
-//		List<TOrderBillNew> listBull=new ArrayList<>();
-//		for (TemporaryReceivables tr : list) {
-//			TOrderBillNew tbn=new TOrderBillNew(); 
-//			//获取已收款
-//			BigDecimal bill = tOrderBillNewMapper.getAmountByOid(tr.getOrderNo());
-//			//获取总金额
-//			TOrderNewBo t=tOrderNewMapper.getOrderNewDetail(tr.getOrderNo());
-//			//订单匹配不到
-//			 if(t==null||t.getOrderNo()==null) {
-//				tr.setStatus(ReceivablesStatus.DDYC.getCode());
-//				temporaryReceivablesMapper.updateByPrimaryKeySelective(tr);
-//				continue;
-//			}else if(t.getDeleteSign()==2||t.getDeleteSign()==3) {
-//				tr.setStatus(ReceivablesStatus.BGSD.getCode());
-//				temporaryReceivablesMapper.updateByPrimaryKeySelective(tr);
-//				continue;
-//			}else if(!tr.getCorporateName().equals(t.getUserName())) {
-//				tr.setStatus(ReceivablesStatus.MCYC.getCode());
-//				temporaryReceivablesMapper.updateByPrimaryKeySelective(tr);
-//				continue;
-//			}else if(temporaryReceivablesMapper.selectReceivablesNumberRepeats(tr)>0) {
-//				tr.setStatus(ReceivablesStatus.YSK.getCode());
-//				temporaryReceivablesMapper.updateByPrimaryKeySelective(tr);
-//				continue;
-//			}
-//			//计算收款结果
-//			BigDecimal bd = bill.add(tr.getAmount());
-//			//判断表中数据
-//			BigDecimal count = new BigDecimal(0).add(bd);
-//			for (TOrderBillNew tBill : listBull) {
-//				if (tBill.getOrderNo().equals(tr.getOrderNo())) {
-//					count=count.add(tBill.getTransactionAmount());
-//					continue;
-//				}
-//			}
-//			TOrderBonus bonus = new TOrderBonus();
-//			bonus.setId(UUID.randomUUID().toString());
-//			bonus.setOrderNo(tr.getOrderNo());
-//			bonus.setGrantBy(TokenManager.getAdminId());
-//			int lstaus = 0;//如果订单流水小于首付 lstaus 0
-//			if(count.compareTo(t.getTotalAmount()) == 1){//如果订单流水总额大于总金额 return -1
-//				tr.setStatus(ReceivablesStatus.JEYC.getCode());
-//				temporaryReceivablesMapper.updateByPrimaryKeySelective(tr);
-//				continue;
-//			}else if (count.compareTo(t.getTotalAmount()) == 0) {//等于总额
-//				//付完款//如果订单流水等于于总金额 lstaus 2
-//				lstaus = 2;
-//				bonus.setBonusSubject(BonusSubject.WK.getCode());//12
-//				//发放给技术员如果付完款所有参与这个项目任务的人都会有结算奖
-//				//获得所有的任务负责人
-//				List<TOrderTask> l = tOrderTaskMapper.getReceiverByOid(tr.getOrderNo());
-//				for (TOrderTask tOrderTask : l) {
-//					if(null != tOrderTask &&null != tOrderTask.getTaskReceiver()){
-//						bonus.setTaskId(tOrderTask.getId());//任务id
-//						bonus.setGrantTarget(tOrderTask.getTaskReceiver());
-//						bonus.setGrantType(1);
-//						int c = tOrderBonusMapper.checkByOnoAndSub(bonus);
-//						//不存在就设置
-//						if(c==0){
-//							bonus.setId(UUID.randomUUID().toString());
-//							tOrderBonusMapper.insertSelective(bonus);
-//						}
-//					}
-//				}
-//				if(tr.getStatus()==2) {
-//					tr.setStatus(0);
-//					temporaryReceivablesMapper.updateByPrimaryKeySelective(tr);
-//				}
-//				addOrderLog(tr.getOrderNo(), OrderLogProcess.CWQK.getCode());	
-//			}else if (count.compareTo(t.getTotalAmount()) == -1) {//小于总额
-//				//如果订单流水小于总金额
-//				if(bd.compareTo(t.getFirstAmount()) == 0 || bd.compareTo(t.getFirstAmount()) == 1){//首付完成
-//					//查看首付奖是否存在
-//					TOrderBonus b = new TOrderBonus();
-//					b.setOrderNo(tr.getOrderNo());
-//					b.setBonusSubject(11);
-//					b.setGrantType(0);
-//					b.setGrantTarget(t.getSalesmanId());
-//					int c = tOrderBonusMapper.checkByOnoAndSub(b);
-//					//不存在就设置
-//					if(c==0){
-//						bonus.setBonusSubject(BonusSubject.SF.getCode());//11
-//					}
-//					lstaus = 1;
-//					
-//					addOrderLog(tr.getOrderNo(), OrderLogProcess.CWSF.getCode());
-//				}
-//				
-//			}
-//			if(tr.getStatus()==2) {
-//				tr.setStatus(0);
-//				temporaryReceivablesMapper.updateByPrimaryKeySelective(tr);
-//			}
-//			//否则新增流水信息
-//			Date date=new Date();
-//			tbn.setBillNo(UUID.randomUUID().toString().replaceAll("-", ""));
-//			tbn.setCreater(TokenManager.getAdminId());
-//			tbn.setType(1);//批量
-//			tbn.setOrderNo(t.getOrderNo());
-//			tbn.setCreateTime(date);
-//			tbn.setPayeeId("0");//默认设置0
-//			tbn.setPayerId(t.getBuyerId());
-//			tbn.setTransactionSubject(0);
-//			tbn.setTransactionChannel(2);
-//			tbn.setConfirmSign(0);
-//			tbn.setTransactionAmount(tr.getAmount());
-//			tbn.setDeleteSign((new Byte("0")));
-//			tbn.setFinancialPayTime(tr.getReceivablesTime());
-//			tbn.setFinancialPayNo(tr.getFinancialPayNo());
-//			tbn.setRemarks(tr.getRemarks());
-//			tOrderMidMapper.updatefinalReceivables(t.getOrderNo(),tr.getAmount(),date);
-//			//修改订单结算金额和结算状态
-//			//如果已经首付并且流程状态是没有派给咨询师的修改流程状态为4
-//			TOrderNew orderNew = new TOrderNew();
-//			orderNew.setOrderNo(tr.getOrderNo());
-//			//这里的已收金额是以前收的所有金额加上本次收的金额
-//			orderNew.setSettlementAmount(count);
-//			orderNew.setLiquidationStatus(lstaus);
-//			tOrderNewMapper.updateByPrimaryKeySelective(orderNew);
-//				//如果达到奖金发放要求新增奖金信息
-//				if(null != bonus.getBonusSubject()){
-//					bonus.setId(UUID.randomUUID().toString());
-//					bonus.setGrantTarget(t.getSalesmanId());
-//					//设置发放人类型
-//					bonus.setGrantType(0);
-//					tOrderBonusMapper.insertSelective(bonus);
-//			}
-//				
-//				listBull.add(tbn);
-//		}
-//		if(!listBull.isEmpty()) {
-//			tOrderBillNewMapper.insertBatch(listBull);
-//			temporaryReceivablesMapper.deleteNormalByaid(TokenManager.getAdminId());
-//		}else {
-//			return -1;
-//		}
-//		LoggerUtils.debug(getClass(), "=========================批量导入结束===================");
-		return 1;
-	}
+	
 
 	@Override
-	public List<OutUserChannel> batchListReceivables(MultipartFile file) {
+	public Object batchListReceivables(MultipartFile file) {
 		 //获得Workbook工作薄对象
         Workbook workbook = ExcelUtils.getWorkBook(file);
         //创建一个对象,用来存储数据
@@ -314,7 +176,7 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserCareerMapper> imp
 		        String uid=UUID.randomUUID().toString();
 		        in.setAid(aid);
 		        in.setCreateTime(now.getTime());
-		        in.setShareType(3);
+		        in.setShareType(0);
 		        in.setPassword(passwordUtil.getEncryptPwd("123456", now.getTime()));
 		        User u=userMapper.selectByName(in.getUserName());
 		        if (u!=null) {
@@ -349,7 +211,7 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserCareerMapper> imp
         	userTransferLogMapper.insertBatch(list);
 		}
     	if(!list2.isEmpty())userChannelMapper.insertBatch(list2);
-    	return userChannelMapper.selectByAidAndstatus(aid,1);
+    	return getErorrList(1,10);
     }
 
 	
@@ -372,9 +234,21 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserCareerMapper> imp
 		return null;
 	}
 
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<OutUserChannel> getErorrList(Integer pageNo,Integer pageSize) {
+		Map<String, Object> map =new HashMap<>();
+		map.put("status", 1);
+		map.put("aid", TokenManager.getAdminId());
+		return (Pagination<OutUserChannel>) findPage("selectByAidAndstatusList", "selectByAidAndstatusCount", map, pageNo, pageSize);
+	}
+
 	@Override
-	public List<OutUserChannel> getErorrList() {
-		return userChannelMapper.selectByAidAndstatus(TokenManager.getAdminId(),1);
+	public Object delete(String ids) {
+		String [] str=ids.split(",");
+		List<String> list=Arrays.asList(str);
+		
+		return userChannelMapper.deleteByIds(list);
 	}
 
 }