Kaynağa Gözat

fix 封禁账号替换增加辅助邮箱;变更会话去掉新增

zoujiajian 1 yıl önce
ebeveyn
işleme
9b499dcdb7

+ 6 - 0
netflix-dao/src/main/java/com/cyksj/model/excel/ExcelBannedAccountData.java

@@ -22,4 +22,10 @@ public class ExcelBannedAccountData {
 
 
 	@ExcelProperty("新账号密码")
 	@ExcelProperty("新账号密码")
 	private String password;
 	private String password;
+
+	@ExcelProperty("辅助邮箱")
+	private String email;
+
+	@ExcelProperty("关联邮箱")
+	private String relateEmail;
 }
 }

+ 4 - 24
netflix-service/src/main/java/com/cyksj/service/corp/impl/CorpServiceImpl.java

@@ -716,7 +716,8 @@ public class CorpServiceImpl implements CorpService {
 		String newServicerUserId = event.getNewServicerUserId();
 		String newServicerUserId = event.getNewServicerUserId();
 		String msgId = wxCpKfMsgItem.getMsgId();
 		String msgId = wxCpKfMsgItem.getMsgId();
 		String msgCode = wxCpKfMsgItem.getEvent().getMsgCode();
 		String msgCode = wxCpKfMsgItem.getEvent().getMsgCode();
-		if (changeType == 1) {
+		//1-从接待池接入会话 4-重新接入已结束/已转接会话
+		if (changeType == 1 || changeType == 4) {
 			CorpKfServicerSessionRecord newSession = new CorpKfServicerSessionRecord();
 			CorpKfServicerSessionRecord newSession = new CorpKfServicerSessionRecord();
 			newSession.setOpenKfId(openKfId);
 			newSession.setOpenKfId(openKfId);
 			newSession.setServicerUserid(newServicerUserId);
 			newSession.setServicerUserid(newServicerUserId);
@@ -736,8 +737,8 @@ public class CorpServiceImpl implements CorpService {
 			setDbSessionState(openKfId, oldServicerUserId, externalUserId, sendDate, changeType, msgId, msgCode);
 			setDbSessionState(openKfId, oldServicerUserId, externalUserId, sendDate, changeType, msgId, msgCode);
 			transCorpKfSessionToServicer(corpId, openKfId, oldServicerUserId, newServicerUserId, externalUserId, changeType, 3, sendDate, msgId);
 			transCorpKfSessionToServicer(corpId, openKfId, oldServicerUserId, newServicerUserId, externalUserId, changeType, 3, sendDate, msgId);
 		}
 		}
-		//3-结束会话 4-重新接入已结束/已转接会话
-		if (changeType == 3 || changeType == 4) {
+		//3-结束会话
+		if (changeType == 3) {
 			setDbSessionState(openKfId, oldServicerUserId, externalUserId, sendDate, changeType, msgId, msgCode);
 			setDbSessionState(openKfId, oldServicerUserId, externalUserId, sendDate, changeType, msgId, msgCode);
 		}
 		}
 	}
 	}
@@ -1000,27 +1001,6 @@ public class CorpServiceImpl implements CorpService {
 				}
 				}
 			}
 			}
 			corpKfServicerSessionRecordMapper.updateById(corpKfServicerSessionRecord);
 			corpKfServicerSessionRecordMapper.updateById(corpKfServicerSessionRecord);
-		} else {
-			corpKfServicerSessionRecord = new CorpKfServicerSessionRecord();
-			corpKfServicerSessionRecord.setOpenKfId(openKfId);
-			corpKfServicerSessionRecord.setServicerUserid(servicerUserid);
-			corpKfServicerSessionRecord.setExternalUserid(externalUserId);
-			corpKfServicerSessionRecord.setServiceState(changeType != 2 ? 1 : changeType);
-			corpKfServicerSessionRecord.setMsgid(msgid);
-			corpKfServicerSessionRecord.setCloseTime(sendDate);
-			corpKfServicerSessionRecordMapper.insert(corpKfServicerSessionRecord);
-			//同步用户该次接待记录
-			syncUserChatSession(corpKfServicerSessionRecord.getId(), externalUserId);
-			//同步会话最早德发送时间
-			CorpKfAccountSessionChat beginChat = corpKfAccountSessionChatMapper.selectOne(Wrappers.lambdaQuery(CorpKfAccountSessionChat.class)
-					.eq(CorpKfAccountSessionChat::getSessionId, corpKfServicerSessionRecord.getId())
-					.eq(CorpKfAccountSessionChat::getExternalUserid, externalUserId)
-					.orderByAsc(CorpKfAccountSessionChat::getId)
-					.last("limit 1"));
-			if (beginChat != null) {
-				corpKfServicerSessionRecord.setStartTime(beginChat.getSendDate());
-				corpKfServicerSessionRecordMapper.updateById(corpKfServicerSessionRecord);
-			}
 		}
 		}
 	}
 	}
 
 

+ 1 - 4
netflix-service/src/main/java/com/cyksj/service/corp/kf/impl/CorpKfServiceImpl.java

@@ -12,10 +12,7 @@ import com.cyksj.common.util.Jsons;
 import com.cyksj.common.util.StringUtil;
 import com.cyksj.common.util.StringUtil;
 import com.cyksj.config.corp.YHLXWxCorpConfig;
 import com.cyksj.config.corp.YHLXWxCorpConfig;
 import com.cyksj.mapper.corp.CorpFollowMapper;
 import com.cyksj.mapper.corp.CorpFollowMapper;
-import com.cyksj.mapper.corp.kf.CorpKfAccountFollowMapper;
-import com.cyksj.mapper.corp.kf.CorpKfAccountMapper;
-import com.cyksj.mapper.corp.kf.CorpKfAccountSessionConfigMapper;
-import com.cyksj.mapper.corp.kf.CorpKfServicerSessionRecordMapper;
+import com.cyksj.mapper.corp.kf.*;
 import com.cyksj.mapper.manage.cms.CmsUserMapper;
 import com.cyksj.mapper.manage.cms.CmsUserMapper;
 import com.cyksj.model.entity.*;
 import com.cyksj.model.entity.*;
 import com.cyksj.model.kf.*;
 import com.cyksj.model.kf.*;

+ 6 - 0
netflix-web/src/main/java/com/cyksj/web/controller/manage/account/CmsAccountController.java

@@ -1068,6 +1068,12 @@ public class CmsAccountController {
 				dbAccount.setPassword(password);
 				dbAccount.setPassword(password);
 				dbAccount.setStartTime(DateTime.now());
 				dbAccount.setStartTime(DateTime.now());
 				dbAccount.setExpiryTime(DateUtil.offsetMonth(DateTime.now(), 1));
 				dbAccount.setExpiryTime(DateUtil.offsetMonth(DateTime.now(), 1));
+				if (StrUtil.isNotEmpty(data.getEmail())) {
+					dbAccount.setEmail(data.getEmail());
+				}
+				if (StrUtil.isNotEmpty(data.getRelateEmail())) {
+					dbAccount.setRelateEmail(data.getRelateEmail());
+				}
 				accountService.updateById(dbAccount);
 				accountService.updateById(dbAccount);
 
 
 				GroupsTrips groupsTrips = groupsMapper.selectOne(Wrappers.lambdaQuery(GroupsTrips.class)
 				GroupsTrips groupsTrips = groupsMapper.selectOne(Wrappers.lambdaQuery(GroupsTrips.class)