Browse Source

外呼系统开发

anderx 1 year ago
parent
commit
43e0bc081b

+ 9 - 1
src/main/java/com/goafanti/customer/service/impl/UserOutboundServiceImpl.java

@@ -12,6 +12,7 @@ import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.User;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.HttpUtils;
+import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.shiro.token.TokenManager;
@@ -35,6 +36,8 @@ public class UserOutboundServiceImpl extends BaseMybatisDao<UserArchivesMapper>
     static final String version= "2.0.6";
     static final String default_url ="https://webmc.zb-sx.cn:1443";
 
+
+
     @Resource
     private SystemWebSocketHandler systemWebSocketHandler;
     @Resource
@@ -170,7 +173,12 @@ public class UserOutboundServiceImpl extends BaseMybatisDao<UserArchivesMapper>
         callLog.setDuration(Integer.parseInt(timeLength));
         callLogMapper.insert(callLog);
         //需要关闭客户呼叫中
-        systemWebSocketHandler.sendMessageToUser(adminId, new TextMessage("callCompleted"));
+        try {
+            systemWebSocketHandler.sendMessageToUser(adminId, new TextMessage("callCompleted"));
+        }catch (Exception e ){
+            LoggerUtils.error(getClass(),"websocket通信失败");
+        }
+
         return 1;
     }