Forráskód Böngészése

游客和客户id统一为userId

779513719 4 éve
szülő
commit
e7bc75e5c6

+ 1 - 6
server-chat/src/main/java/com/cn/service/IMChatLoginServiceProcessor.java

@@ -502,12 +502,7 @@ public class IMChatLoginServiceProcessor implements LoginCmdProcessor {
         //会话状态 0:游客会话 1:客户会话  群组类型 0:游客-客服 类型 1:客户-客服 类型
         attrs.put("state", group.getGroupType());
         attrs.put("consumer_id",group.getConsumerId());
-        if(VisitTypeEnum.CUSTOMER.getKey().equals(user.getVisitType())){
-            attrs.put("user_id", Long.valueOf(user.getExtras().getString("customerId")));
-        }
-        if(VisitTypeEnum.VISITOR.getKey().equals(user.getVisitType())){
-            attrs.put("user_id", Long.valueOf(user.getExtras().getString("visitorId")));
-        }
+        attrs.put("user_id", Long.valueOf(user.getExtras().getString("userId")));
         attrs.put("user_nickname", user.getNick());
         attrs.put("user_phone", user.getExtras().getString("phone"));
         attrs.put("company_id", Long.valueOf(group.getCompanyId()));