瀏覽代碼

心跳检测

humuyu 3 年之前
父節點
當前提交
b51e44e5ea

+ 1 - 23
eladmin-system/src/main/java/me/zhengjie/application/admin/controller/OrderRoomIdController.java

@@ -91,6 +91,7 @@ public class OrderRoomIdController {
 		if (socketObj != null) {
 			String accountId = socketObj.getString("accountId");
 			String businessNo = socketObj.getString("businessNo");
+			//查询所有的绑定关系
 			Set<String> userNames = appRelatePc.getBindNotary(businessNo);
 			for (String userName : userNames) {
 				HashMap<UUID, SocketIOClient> userClient = pcSocketClientCache.getUserClient(userName);
@@ -101,7 +102,6 @@ public class OrderRoomIdController {
 					}
 				}
 			}
-
 			List<JSONObject> bindNotarys = new ArrayList<>();
 			jsonObj = new JSONObject();
 			jsonObj.put("userName", socketObj.getString("accountId"));
@@ -147,37 +147,15 @@ public class OrderRoomIdController {
 		JSONObject jsonObj = JSONObject.parseObject(json);
 		String socketId = jsonObj.getString("socketId");
 		JSONObject socketObj = isPushUserName(socketId);
-
 		if (socketObj == null) {
 			return AppBaseResponse.success();
 		}
-	
 		String businessNo = socketObj.getString("businessNo");
 		log.info("pc端取消公证员绑定人员:{} ",businessNo);
 		appRelatePc.removeNotary(businessNo, socketObj.getString("accountId"));
-//		Set<String> notarys = appRelatePc.getBindNotary(businessNo);
-//		if (CollectionUtils.isEmpty(notarys) || notarys.size() == 1) {
-//			// 直接删除这条数据
-//			appRelatePc.delBusinessNo(businessNo);
-//			// TDOO 发送给app。取消了视频通话
-//			sendAppMsg(businessNo);
-//			return AppBaseResponse.success();
-//		}
-//		notarys.remove(socketObj.getString("accountId"));
-//		// 保存没有取消的时间
-//		appRelatePc.setNoCancelNotary(notarys, businessNo);
 		return AppBaseResponse.success();
 	}
 
-	private void sendAppMsg(String businessNo) {
-		HashMap<UUID, SocketIOClient> appSocketIo = appSocketClientCache.getUserClient(businessNo);
-		if (MapUtils.isNotEmpty(appSocketIo)) {
-			appSocketIo.forEach((uuid, socketIOClient) -> {
-				socketIOClient.sendEvent("cancelEvent", "cancel");
-			});
-		}
-	}
-
 	/**
 	 * 结束视频
 	 *

+ 1 - 2
eladmin-system/src/main/java/me/zhengjie/base/websocket/SocketEventListenner.java

@@ -140,12 +140,11 @@ public class SocketEventListenner {
 	public void pingEvent(SocketIOClient client, AckRequest request, Map<String, String> map) throws Exception {
 		String pcSname = map.get("pcSname");
 		if (StringUtils.isNotBlank(pcSname)) {
+			log.info("当前公证员的心跳检测:" + pcSname);
 			HashMap<UUID, SocketIOClient> socketIOClient = pcSocketClientCache.getUserClient(pcSname);
 			if (MapUtils.isEmpty(socketIOClient)) {
 				client.sendEvent("logoutEvent", "close");
 			}
-		} else {
-			log.info("当前公证员的心跳检测:" + pcSname);
 		}
 
 	}

+ 1 - 1
eladmin-system/src/main/resources/config/application-nt.yml

@@ -122,7 +122,7 @@ mybatis-plus:
   configuration:
     map-underscore-to-camel-case: true
     auto-mapping-behavior: full
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
   mapper-locations: classpath*:mapper/*Mapper.xml
 #  type-aliases-package: com.tcpp.FqNotarize.entity
   global-config:

+ 1 - 1
eladmin-system/src/main/resources/config/application.yml

@@ -3,7 +3,7 @@ spring:
   freemarker:
     check-template-location: false
   profiles:
-    active: dev
+    active: nt-test
   jackson:
     time-zone: GMT+8
   data: