Bladeren bron

修改客户跟进列表,新增批量操作

Signed-off-by: Administrator <Administrator@PC-20170312YABW>
Administrator 5 jaren geleden
bovenliggende
commit
80515f446d

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

@@ -89,9 +89,12 @@ public interface UserLockReleaseMapper {
 	 */
 	int updateUserLock(@Param("uid")String uid,@Param("aid")String aid,@Param("oldStatus")Integer oldStatus,@Param("newStatus")Integer newStatus);
 	
+	int updateUsersLock(@Param("uList")List<String> uList,@Param("aid")String aid,@Param("oldStatus")Integer oldStatus,@Param("newStatus")Integer newStatus);
+	
 	int updateUserTypeLock(@Param("uid")String uid,@Param("aid")String aid,@Param("type")Integer type,
 			@Param("newStatus")Integer newStatus,@Param("date") Date date);
-
+	void updateUserTypeLockList(@Param("list")List<String> list, @Param("aid")String aid,@Param("type")Integer type,
+			@Param("newStatus")Integer newStatus,@Param("date") Date date);
 	List<LockingReleaseBo> selectWaitReleaseCustomer(String aid);
 
 	List<LockingReleaseBo> selectWaitReleaseBusiness(String aid);
@@ -120,4 +123,8 @@ public interface UserLockReleaseMapper {
 	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);
+
+	int insertList(List<UserLockRelease> ulrList);
+
+	
 }

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

@@ -1,5 +1,6 @@
 package com.goafanti.common.dao;
 
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -254,5 +255,19 @@ public interface UserMapper {
 	 List<CustomerListOut> privateUnitCustomerList(@Param("params")Map<String, Object> params);
 
 	int pushUserGuidance(@Param("id")String id, @Param("guidance")Integer guidance);
+
+	/**
+	 * 
+	 * @param aid   归属人
+	 * @param level 等级
+	 * @param source 来源
+	 * @param transferTime 转换时间
+	 * @param shareType 私有标示
+	 * @param list  用户id列表
+	 */
+	void updateList(@Param("aid")String aid,@Param("level")Integer level, @Param("source")Integer source,
+			@Param("transferTime")Date transferTime,@Param("shareType")Integer shareType,@Param("list")List<String> list);
+
+	
 	
 }

+ 101 - 99
src/main/java/com/goafanti/common/dao/UserTransferLogMapper.java

@@ -1,100 +1,102 @@
-package com.goafanti.common.dao;
-
-import com.goafanti.common.model.UserTransferLog;
-import com.goafanti.common.model.UserTransferLogExample;
-import com.goafanti.customer.bo.transferListBo;
-
-import java.util.List;
-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);
-
-	List<transferListBo> selectByUidGetList(String uid);
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.UserTransferLog;
+import com.goafanti.common.model.UserTransferLogExample;
+import com.goafanti.customer.bo.transferListBo;
+
+import java.util.List;
+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);
+
+	List<transferListBo> selectByUidGetList(String uid);
+
+	void insertList(List<UserTransferLog> utfList);
 }

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

@@ -354,11 +354,28 @@
   	update user_lock_release set status = #{newStatus} where uid = #{uid} and aid = #{aid} and type = 0 and status = #{oldStatus}
   </update>
   
+  <update id="updateUsersLock">
+  	update user_lock_release set status = #{newStatus} 
+  	where aid = #{aid} and type = 0 and status = #{oldStatus}
+  	and uid in
+  	<foreach item="item" collection="uList" separator="," open="(" close=")" index="">
+       #{item}
+     </foreach>
+  </update>
+  
   <update id="updateUserTypeLock">
   	update user_lock_release set status = #{newStatus} , release_time= #{date}
   	where uid = #{uid} and aid = #{aid} and type = 0 and type = #{type}
   </update>
   
+  <update id="updateUserTypeLockList">
+  	update user_lock_release set status = #{newStatus} , release_time= #{date}
+  	where aid = #{aid} and type = 0 and type = #{type} and uid in
+	<foreach item="item" collection="list" separator="," open="(" close=")" index="">
+       #{item}
+    </foreach>
+  </update>
+  
   <select id="selectWaitReleaseCustomer" resultType="com.goafanti.customer.bo.LockingReleaseBo">
 	select 
 		t0.id,
@@ -455,4 +472,18 @@
   set last_sign_time=#{lockTime},last_follow_time=#{followTime}
   where uid=#{uid} and aid=#{aid}
   </update> 
+  
+  <insert id="insertList" >
+      insert into user_lock_release (id, type, uid, 
+      aid, business_project_id, status, 
+      lock_time, release_time, order_no
+      )
+    values
+    <foreach item="item" collection="list" separator="," index="">
+       	(#{item.id,jdbcType=VARCHAR}, #{item.type,jdbcType=INTEGER}, #{item.uid,jdbcType=VARCHAR}, 
+      #{item.aid,jdbcType=VARCHAR}, #{item.businessProjectId,jdbcType=VARCHAR}, #{item.status,jdbcType=INTEGER}, 
+      #{item.lockTime,jdbcType=DATE}, #{item.releaseTime,jdbcType=DATE}, #{item.orderNo,jdbcType=VARCHAR})
+     </foreach>
+  </insert>
+  
 </mapper>

+ 25 - 0
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1621,4 +1621,29 @@
   <update id="pushUserGuidance"> 
   update user set guidance=#{guidance} where id=#{id}
   </update>
+  <update id="updateList">
+    update user
+    <set>
+    <if test="source != null">
+      source = #{source,jdbcType=INTEGER},
+      </if>
+      <if test="level != null">
+      level= #{level,jdbcType=INTEGER},
+      </if>
+      <if test="aid != null">
+      aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="transferTime != null">
+      transfer_time = #{transferTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="shareType != null">
+      share_type = #{shareType,jdbcType=VARCHAR}
+      </if>
+    </set>
+	where id in 
+	  <foreach item="item" collection="list" separator="," open="(" close=")" index="">
+       #{item}
+     </foreach>
+  </update>
+  
 </mapper>

+ 337 - 325
src/main/java/com/goafanti/common/mapper/UserTransferLogMapper.xml

@@ -1,326 +1,338 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.goafanti.common.dao.UserTransferLogMapper">
-  <resultMap id="BaseResultMap" type="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.
-    -->
-    <id column="id" jdbcType="INTEGER" property="id" />
-    <result column="uid" jdbcType="VARCHAR" property="uid" />
-    <result column="aid" jdbcType="VARCHAR" property="aid" />
-    <result column="pid" jdbcType="VARCHAR" property="pid" />
-    <result column="take_aid" jdbcType="VARCHAR" property="takeAid" />
-    <result column="type" jdbcType="INTEGER" property="type" />
-    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
-  </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.
-    -->
-    id, uid, aid, pid, take_aid, type, create_time
-  </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.
-    -->
-    select 
-    <include refid="Base_Column_List" />
-    from user_transfer_log
-    where id = #{id,jdbcType=INTEGER}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-    <!--
-      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
-    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.
-    -->
-    insert into user_transfer_log (id, uid, aid, 
-      pid, take_aid, type, 
-      create_time)
-    values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
-      #{pid,jdbcType=VARCHAR}, #{takeAid,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
-      #{createTime,jdbcType=TIMESTAMP})
-  </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.
-    -->
-    insert into user_transfer_log
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
-      <if test="uid != null">
-        uid,
-      </if>
-      <if test="aid != null">
-        aid,
-      </if>
-      <if test="pid != null">
-        pid,
-      </if>
-      <if test="takeAid != null">
-        take_aid,
-      </if>
-      <if test="type != null">
-        type,
-      </if>
-      <if test="createTime != null">
-        create_time,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=INTEGER},
-      </if>
-      <if test="uid != null">
-        #{uid,jdbcType=VARCHAR},
-      </if>
-      <if test="aid != null">
-        #{aid,jdbcType=VARCHAR},
-      </if>
-      <if test="pid != null">
-        #{pid,jdbcType=VARCHAR},
-      </if>
-      <if test="takeAid != null">
-        #{takeAid,jdbcType=VARCHAR},
-      </if>
-      <if test="type != null">
-        #{type,jdbcType=INTEGER},
-      </if>
-      <if test="createTime != null">
-        #{createTime,jdbcType=TIMESTAMP},
-      </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.
-    -->
-    update user_transfer_log
-    <set>
-      <if test="uid != null">
-        uid = #{uid,jdbcType=VARCHAR},
-      </if>
-      <if test="aid != null">
-        aid = #{aid,jdbcType=VARCHAR},
-      </if>
-      <if test="pid != null">
-        pid = #{pid,jdbcType=VARCHAR},
-      </if>
-      <if test="takeAid != null">
-        take_aid = #{takeAid,jdbcType=VARCHAR},
-      </if>
-      <if test="type != null">
-        type = #{type,jdbcType=INTEGER},
-      </if>
-      <if test="createTime != null">
-        create_time = #{createTime,jdbcType=TIMESTAMP},
-      </if>
-    </set>
-    where id = #{id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" 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.
-    -->
-    update user_transfer_log
-    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}
-    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
-  	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 
-	where uid= #{uid}
-  </select>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.UserTransferLogMapper">
+  <resultMap id="BaseResultMap" type="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.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="uid" jdbcType="VARCHAR" property="uid" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="pid" jdbcType="VARCHAR" property="pid" />
+    <result column="take_aid" jdbcType="VARCHAR" property="takeAid" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </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.
+    -->
+    id, uid, aid, pid, take_aid, type, create_time
+  </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.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from user_transfer_log
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      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
+    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.
+    -->
+    insert into user_transfer_log (id, uid, aid, 
+      pid, take_aid, type, 
+      create_time)
+    values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
+      #{pid,jdbcType=VARCHAR}, #{takeAid,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP})
+  </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.
+    -->
+    insert into user_transfer_log
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="uid != null">
+        uid,
+      </if>
+      <if test="aid != null">
+        aid,
+      </if>
+      <if test="pid != null">
+        pid,
+      </if>
+      <if test="takeAid != null">
+        take_aid,
+      </if>
+      <if test="type != null">
+        type,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="uid != null">
+        #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="pid != null">
+        #{pid,jdbcType=VARCHAR},
+      </if>
+      <if test="takeAid != null">
+        #{takeAid,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </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.
+    -->
+    update user_transfer_log
+    <set>
+      <if test="uid != null">
+        uid = #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="pid != null">
+        pid = #{pid,jdbcType=VARCHAR},
+      </if>
+      <if test="takeAid != null">
+        take_aid = #{takeAid,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        type = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" 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.
+    -->
+    update user_transfer_log
+    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}
+    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
+  	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 
+	where uid= #{uid}
+  </select>
+  
+   <insert id="insertList">
+    insert into user_transfer_log ( uid, aid, 
+      pid, take_aid, type, 
+      create_time)
+    values 
+    <foreach item="item" collection="list" separator="," index="">
+    ( #{item.uid,jdbcType=VARCHAR}, #{item.aid,jdbcType=VARCHAR}, 
+      #{item.pid,jdbcType=VARCHAR}, #{item.takeAid,jdbcType=VARCHAR}, #{item.type,jdbcType=INTEGER}, 
+      #{item.createTime,jdbcType=TIMESTAMP})
+     </foreach>
+  </insert>
 </mapper>

+ 129 - 45
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -4,6 +4,7 @@ import java.lang.reflect.InvocationTargetException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -359,7 +360,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		cob.setMajor(AFTConstants.YES);
 		organizationContactBookMapper.insert(cob);
 		//新增锁定数据
-		addUserLock(uid, TokenManager.getAdminId(),0,null, now);
+		addUserLock(uid, TokenManager.getAdminId(),0,null, now,false);
 		return 1;
 	}
 
@@ -1005,6 +1006,15 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	public int updateByOperatorType(String uid,String oldAid, String operatorType,Object... params) {
 		User user = new User();
 		Date now = new Date();
+		//是否多个客户
+		boolean isUs=false;
+		if (uid.contains(",")) {
+			isUs=true;
+		}
+		List<String> uList=new ArrayList<>();
+		if (isUs) {
+			uList=Arrays.asList(uid.split(","));
+		}
 		user.setId(uid);
 		int flag = 0;
 		if(operatorType.equals(AFTConstants.USER_RECEIVE)){
@@ -1015,24 +1025,38 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			user.setInformationMaintainer(TokenManager.getAdminId());
 			user.setSource(2);//客户来源设置为领取
 			user.setTransferTime(now);
-			flag = addUserLock(uid,TokenManager.getAdminId(),0,null,now); //指定用户锁定客户
+			flag = addUserLock(uid,TokenManager.getAdminId(),0,null,now,false); //指定用户锁定客户
 			if(flag <= 0) throw new BusinessException(new Error(ErrorConstants.CUSTOMER_ALREADY_RECEIVE,""));
 			organizationContactBookMapper.updateAdmin(uid,TokenManager.getAdminId());
 		}else if(operatorType.equals(AFTConstants.USER_TRANSFER_TO_OTHER)){
-			user.setAid(String.valueOf(params[0]));
-			user.setSource(3);//客户来源设置为转交
-//			转换不重置时间
-//			user.setTransferTime(now);
-			//查询这个客户是否是登陆人的客户
-			if(userMapper.getAidAndUser(uid,TokenManager.getAdminId())<=0)throw new BusinessException(new Error("请勿非法操作!","请勿非法操作!"));
-			flag = updateUserLock(uid,oldAid,UserLockReleaseStatus.LOCKED.getCode(),UserLockReleaseStatus.RELEASE.getCode()); //原用户释放客户
-			if(flag > 0 ) flag = addUserLock(uid,String.valueOf(params[0]),0,null,now); //指定用户锁定客户
-			if(flag <= 0) throw new BusinessException(new Error(ErrorConstants.CUSTOMER_TRANSFER_FAIL,""));
-			addtransferLog(uid,null,TokenManager.getAdminId(),String.valueOf(params[0]),0);
+			if(!isUs) {
+				user.setAid(String.valueOf(params[0]));
+				user.setSource(3);//客户来源设置为转交
+//				转换不重置时间
+//				user.setTransferTime(now);
+				//查询这个客户是否是登陆人的客户
+				if(userMapper.getAidAndUser(uid,TokenManager.getAdminId())<=0)throw new BusinessException(new Error("请勿非法操作!","请勿非法操作!"));
+				flag = updateUserLock(uid,oldAid,UserLockReleaseStatus.LOCKED.getCode(),UserLockReleaseStatus.RELEASE.getCode()); //原用户释放客户
+				if(flag > 0 ) flag = addUserLock(uid,String.valueOf(params[0]),0,null,now,isUs); //指定用户锁定客户
+				if(flag <= 0) throw new BusinessException(new Error(ErrorConstants.CUSTOMER_TRANSFER_FAIL,""));
+				addtransferLog(uid,null,TokenManager.getAdminId(),String.valueOf(params[0]),0,isUs);
+			}else {
+				for (String us : uList) {
+					if(userMapper.getAidAndUser(us,TokenManager.getAdminId())<=0)throw new BusinessException(new Error("请勿非法操作!","请勿非法操作!"));
+				}
+				flag = updateUsersLock(uList,oldAid,UserLockReleaseStatus.LOCKED.getCode(),UserLockReleaseStatus.RELEASE.getCode()); //原用户释放客户
+				if(flag > 0 ) flag = addUserLock(uid,String.valueOf(params[0]),0,null,now,isUs); //指定用户锁定客户
+				if(flag <= 0) throw new BusinessException(new Error(ErrorConstants.CUSTOMER_TRANSFER_FAIL,""));
+				addtransferLog(uid,null,TokenManager.getAdminId(),String.valueOf(params[0]),0,isUs);
+			}
 		}
-		return userMapper.updateByPrimaryKeySelective(user);
+		if (isUs)  userMapper.updateList(String.valueOf(params[0]),null,3,null,null,uList);
+		else userMapper.updateByPrimaryKeySelective(user);
+		return 1; 
 	}
 
+	
+
 	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<StatisticBo> customerStatistics(Date sDate, Date eDate, String depNo, String businessGlossoryId, Integer pageNo, Integer pageSize) {
@@ -1445,25 +1469,52 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	private int updateUserLock(String uid,String aid,Integer oldStatus,Integer newStatus){
 		return userLockReleaseMapper.updateUserLock(uid,aid,oldStatus,newStatus);
 	}
+	private int updateUsersLock(List<String> uList, String aid, Integer oldStatus, Integer newStatus) {
+		return userLockReleaseMapper.updateUsersLock(uList,aid,oldStatus,newStatus);
+	}
 	
-	private int addUserLock(String uid,String aid,Integer type,String pid,Date lockTime){
-		UserLockRelease ulr = new UserLockRelease();
-		ulr.setId(UUID.randomUUID().toString());
-		if (type==0) {
-			ulr.setType(0);
+	private int addUserLock(String uid,String aid,Integer type,String pid,Date lockTime, boolean isUs){
+		if (!isUs) {
+			UserLockRelease ulr = new UserLockRelease();
+			ulr.setId(UUID.randomUUID().toString());
+			if (type==0) {
+				ulr.setType(0);
+			}else {
+				ulr.setType(1);
+				ulr.setBusinessProjectId(pid);
+			}
+			ulr.setAid(aid);
+			ulr.setLockTime(lockTime);
+			ulr.setStatus(UserLockReleaseStatus.LOCKED.getCode());
+			ulr.setUid(uid);
+			userLockReleaseMapper.insert(ulr);
 		}else {
-			ulr.setType(1);
-			ulr.setBusinessProjectId(pid);
+			List<String> ulist=Arrays.asList(uid.split(","));
+			List<UserLockRelease> ulrList=new ArrayList<>();
+			for (String s : ulist) {
+				UserLockRelease ulr = new UserLockRelease();
+				ulr.setId(UUID.randomUUID().toString());
+				if (type==0) {
+					ulr.setType(0);
+				}else {
+					ulr.setType(1);
+					ulr.setBusinessProjectId(pid);
+				}
+				ulr.setAid(aid);
+				ulr.setLockTime(lockTime);
+				ulr.setStatus(UserLockReleaseStatus.LOCKED.getCode());
+				ulr.setUid(s);
+				ulrList.add(ulr);
+			}
+			 userLockReleaseMapper.insertList(ulrList);
 		}
-		ulr.setAid(aid);
-		ulr.setLockTime(lockTime);
-		ulr.setStatus(UserLockReleaseStatus.LOCKED.getCode());
-		ulr.setUid(uid);
-		return userLockReleaseMapper.insert(ulr);
+		return 1;
 	}
 	
 	
 	
+	
+	
 	/**
 	 * 查询需要释放客户
 	 * @param uid
@@ -1571,7 +1622,13 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 
 	@Override
 	public int updateUserLevel(User u) {
-		return userMapper.updateByPrimaryKeySelective(u);
+		if (!u.getId().contains(",")) {
+			userMapper.updateByPrimaryKeySelective(u);
+		}else {
+			List<String> ulist=Arrays.asList(u.getId().split(","));
+			userMapper.updateList(null, u.getLevel(), null,null,null, ulist);
+		}
+		return 1; 
 	}
 
 	@Override
@@ -1622,7 +1679,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 //		不修改时间
 //		ul.setReleaseTime(now);
 		userLockReleaseMapper.updateByPrimaryKeySelective(ul);
-		addtransferLog(uid,pid,TokenManager.getAdminId(),inputId,1);
+		addtransferLog(uid,pid,TokenManager.getAdminId(),inputId,1,false);
 //		addUserLock(uid,inputId,1,pid,now); //指定用户锁定客户
 		List<BusinessListBo> bl=userBusinessMapper.selectBusinessProjectByUAPid(uid, TokenManager.getAdminId(), pid);
 		if (bl.size()==1) {
@@ -1635,15 +1692,32 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		return 1;
 	}
 
-	private void addtransferLog(String uid, String pid, String aid, String takeAid,Integer type) {
-		UserTransferLog utl=new UserTransferLog();
-		utl.setAid(aid);
-		utl.setCreateTime(new Date());
-		utl.setPid(pid);
-		utl.setTakeAid(takeAid);
-		utl.setType(type);
-		utl.setUid(uid);
-		userTransferLogMapper.insertSelective(utl);
+	private void addtransferLog(String uid, String pid, String aid, String takeAid,Integer type, boolean isUs) {
+		if (!isUs) {
+			UserTransferLog utl=new UserTransferLog();
+			utl.setAid(aid);
+			utl.setCreateTime(new Date());
+			utl.setPid(pid);
+			utl.setTakeAid(takeAid);
+			utl.setType(type);
+			utl.setUid(uid);
+			userTransferLogMapper.insertSelective(utl);
+		}else {
+			List<String> ulist=Arrays.asList(uid.split(","));
+			List<UserTransferLog> utfList=new ArrayList<>();
+			for (String us : ulist) {
+				UserTransferLog utl=new UserTransferLog();
+				utl.setAid(aid);
+				utl.setCreateTime(new Date());
+				utl.setPid(pid);
+				utl.setTakeAid(takeAid);
+				utl.setType(type);
+				utl.setUid(us);
+				utfList.add(utl);
+			}
+			userTransferLogMapper.insertList(utfList);
+		}
+		
 		
 	}
 
@@ -1655,16 +1729,26 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	@Override
 	public int pushReleaseUser(String id) {
 		Date date =new Date();
-		User u=userMapper.selectByPrimaryKey(id);
-		System.out.println(u.getAid());
-		System.out.println(TokenManager.getAdminId());
-		if (!u.getAid().equals(TokenManager.getAdminId())) {
-			throw new BuilderException("客户归属错误!");
+		if (!id.contains(",")) {
+			User u=userMapper.selectByPrimaryKey(id);
+			if (!u.getAid().equals(TokenManager.getAdminId())) {
+				throw new BuilderException("客户归属错误!");
+			}
+			u.setTransferTime(date);
+			u.setShareType(1);
+			userMapper.updateByPrimaryKeySelective(u);
+			userLockReleaseMapper.updateUserTypeLock(u.getId(), TokenManager.getAdminId(), 0, 2,date);
+		}else {
+			List<String> list=Arrays.asList(id.split(","));
+			for (String str : list) {
+				User u=userMapper.selectByPrimaryKey(str);
+				if (!u.getAid().equals(TokenManager.getAdminId())) {
+					throw new BuilderException("客户归属错误!");
+				}
+			}
+			userMapper.updateList(null, null, null,date,1, list);
+			userLockReleaseMapper.updateUserTypeLockList(list, TokenManager.getAdminId(), 0, 2,date);
 		}
-		u.setTransferTime(date);
-		u.setShareType(1);
-		userMapper.updateByPrimaryKeySelective(u);
-		userLockReleaseMapper.updateUserTypeLock(u.getId(), TokenManager.getAdminId(), 0, 2,date);
 		return 1;
 	}
 

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

@@ -69,7 +69,7 @@ avatar.upload.host=//sb.jishutao.com/upload
 
 #连测试
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.1.52
+static.host=//static.jishutao.com/1.1.54
 
 upload.path=F:/data/public/upload
 upload.private.path=F:/data/private/upload