anderx 4 anni fa
parent
commit
3d80985177

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

@@ -63,8 +63,10 @@ public interface UserChannelMapper {
 	 * @param type type==2 status=5 recovery=1,type !=2 status=1
 	 * @param date
 	 * @param maid 
+	 * @param status 
 	 */
-	void updateByuids(@Param("list")List<String> list, @Param("type")Integer type, @Param("date")Date date, @Param("maid")String maid);
+	void updateByuids(@Param("list")List<String> list, @Param("type")Integer type, @Param("date")Date date,
+			@Param("maid")String maid, @Param("status")Integer status);
 
 	int deleteByIds(List<String> list);
 

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

@@ -235,7 +235,7 @@
     <update id="updateByuids">
      update user_channel set
      <if test="type != 2">
-     status = 1
+     status =  #{status}
      </if>
      <if test="type == 2">
      status = 5 , recovery=1

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

@@ -546,7 +546,7 @@ public interface CustomerService {
 	 * @param uids 用户集
 	 * @param receiveId 接受者
 	 * @param remarks	备注
-	 * @param type	0分配 1转交 2回退
+	 * @param type	0总监分配 1经理分配 2回退
 	 * @return
 	 */
 	Object pushChannelDeliver(List<String> uids, String receiveId, String remarks, Integer type);

+ 11 - 3
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -2081,7 +2081,15 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	@Override
 	public Object pushChannelDeliver(List<String> uids, String receiveId, String remarks, Integer type) {
 		Date date = new Date();
-		int i = userMapper.updatechannelCustomerDeliver(uids, receiveId);
+		Integer i = userMapper.updatechannelCustomerDeliver(uids, receiveId);
+		Integer status=null;
+		String role=userMapper.checkRoleMax(receiveId);
+		if (role.equals(AFTConstants.SALESMAN_MANAGER)) {
+			status=1;
+		}else {
+			status=2;
+		}
+		
 		if (i > 0) {
 			List<UserTransferLog> l = new ArrayList<UserTransferLog>();
 			for (String string : uids) {
@@ -2109,9 +2117,9 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			userLockReleaseMapper.updateChannelList(uids,receiveId);
 		}
 		if(type==0) {
-			userChannelMapper.updateByuids(uids, type, date,receiveId);
+			userChannelMapper.updateByuids(uids, type, date,receiveId,status);
 		}else {
-			userChannelMapper.updateByuids(uids, type, date,null);
+			userChannelMapper.updateByuids(uids, type, date,null,status);
 		}
 		
 		organizationContactBookMapper.updateByUids(uids, receiveId);