diff --git a/iot-modules/iot-box-websocket-api/src/main/java/com/qiuguo/iot/box/websocket/api/handler/BaseWebSocketProcess.java b/iot-modules/iot-box-websocket-api/src/main/java/com/qiuguo/iot/box/websocket/api/handler/BaseWebSocketProcess.java index d749fbf..1160d5e 100644 --- a/iot-modules/iot-box-websocket-api/src/main/java/com/qiuguo/iot/box/websocket/api/handler/BaseWebSocketProcess.java +++ b/iot-modules/iot-box-websocket-api/src/main/java/com/qiuguo/iot/box/websocket/api/handler/BaseWebSocketProcess.java @@ -313,14 +313,16 @@ public class BaseWebSocketProcess { } } deviceUserTalkRecordService.insertDeviceUserTalkRecord(talkRecord).map(i ->{ + String msg = JSONObject.toJSONString(resp); + log.info("推送通知到端msg:{}", msg); if(this instanceof BoxWebSocketHandler){ - log.info("推送通知到客户端"); + log.info("果box聊天记录,同步到客户端"); BaseSession userSession = getUserSessionWithUserId(baseSession.getUserId()); if(userSession != null){ userSession.getSink().next(baseSession.getSession().textMessage(JSONObject.toJSONString(resp))); } } - baseSession.getSink().next(baseSession.getSession().textMessage(JSONObject.toJSONString(resp))); + baseSession.getSink().next(baseSession.getSession().textMessage(msg)); return Mono.empty(); }).subscribe();//保存聊天记录 diff --git a/logs/iot-box-websocket-api/error.log b/logs/iot-box-websocket-api/error.log index e8b1e7b..a86f3d2 100644 --- a/logs/iot-box-websocket-api/error.log +++ b/logs/iot-box-websocket-api/error.log @@ -436,3 +436,7 @@ Caused by: java.net.ConnectException: Connection refused (Connection refused) ... 51 common frames omitted 11:04:57.044 [com.alibaba.nacos.client.naming.updater] INFO c.a.n.client.naming - [processServiceJson,232] []- new ips(1) service: DEFAULT_GROUP@@qiuguo-iot-box-websocket@@DEFAULT -> [{"instanceId":"127.0.0.1#8080#DEFAULT#DEFAULT_GROUP@@qiuguo-iot-box-websocket","ip":"127.0.0.1","port":8080,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@qiuguo-iot-box-websocket","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000}] 11:04:57.045 [com.alibaba.nacos.client.naming.updater] INFO c.a.n.client.naming - [processServiceJson,271] []- current ips:(3) service: DEFAULT_GROUP@@qiuguo-iot-box-websocket@@DEFAULT -> [{"instanceId":"172.31.133.185#8080#DEFAULT#DEFAULT_GROUP@@qiuguo-iot-box-websocket","ip":"172.31.133.185","port":8080,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@qiuguo-iot-box-websocket","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000},{"instanceId":"127.0.0.1#8080#DEFAULT#DEFAULT_GROUP@@qiuguo-iot-box-websocket","ip":"127.0.0.1","port":8080,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@qiuguo-iot-box-websocket","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000},{"instanceId":"172.27.48.1#8080#DEFAULT#DEFAULT_GROUP@@qiuguo-iot-box-websocket","ip":"172.27.48.1","port":8080,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@qiuguo-iot-box-websocket","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000}] +11:07:20.648 [background-preinit] INFO o.h.v.i.util.Version - [,21] - HV000001: Hibernate Validator 6.2.5.Final +11:07:21.405 [main] WARN c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,87] - Ignore the empty nacos configuration and get it based on dataId[qiuguo-iot-box-websocket] & group[DEFAULT_GROUP] +11:07:21.415 [main] WARN c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,87] - Ignore the empty nacos configuration and get it based on dataId[qiuguo-iot-box-websocket-dev.yml] & group[DEFAULT_GROUP] +11:07:21.415 [main] INFO o.s.c.b.c.PropertySourceBootstrapConfiguration - [doInitialize,134] - Located property source: [BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket-dev.yml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket.yml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-application-dev.yml,DEFAULT_GROUP'}] diff --git a/logs/iot-box-websocket-api/info.log b/logs/iot-box-websocket-api/info.log index e8b1e7b..a86f3d2 100644 --- a/logs/iot-box-websocket-api/info.log +++ b/logs/iot-box-websocket-api/info.log @@ -436,3 +436,7 @@ Caused by: java.net.ConnectException: Connection refused (Connection refused) ... 51 common frames omitted 11:04:57.044 [com.alibaba.nacos.client.naming.updater] INFO c.a.n.client.naming - [processServiceJson,232] []- new ips(1) service: DEFAULT_GROUP@@qiuguo-iot-box-websocket@@DEFAULT -> [{"instanceId":"127.0.0.1#8080#DEFAULT#DEFAULT_GROUP@@qiuguo-iot-box-websocket","ip":"127.0.0.1","port":8080,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@qiuguo-iot-box-websocket","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000}] 11:04:57.045 [com.alibaba.nacos.client.naming.updater] INFO c.a.n.client.naming - [processServiceJson,271] []- current ips:(3) service: DEFAULT_GROUP@@qiuguo-iot-box-websocket@@DEFAULT -> [{"instanceId":"172.31.133.185#8080#DEFAULT#DEFAULT_GROUP@@qiuguo-iot-box-websocket","ip":"172.31.133.185","port":8080,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@qiuguo-iot-box-websocket","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000},{"instanceId":"127.0.0.1#8080#DEFAULT#DEFAULT_GROUP@@qiuguo-iot-box-websocket","ip":"127.0.0.1","port":8080,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@qiuguo-iot-box-websocket","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000},{"instanceId":"172.27.48.1#8080#DEFAULT#DEFAULT_GROUP@@qiuguo-iot-box-websocket","ip":"172.27.48.1","port":8080,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@qiuguo-iot-box-websocket","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000}] +11:07:20.648 [background-preinit] INFO o.h.v.i.util.Version - [,21] - HV000001: Hibernate Validator 6.2.5.Final +11:07:21.405 [main] WARN c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,87] - Ignore the empty nacos configuration and get it based on dataId[qiuguo-iot-box-websocket] & group[DEFAULT_GROUP] +11:07:21.415 [main] WARN c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,87] - Ignore the empty nacos configuration and get it based on dataId[qiuguo-iot-box-websocket-dev.yml] & group[DEFAULT_GROUP] +11:07:21.415 [main] INFO o.s.c.b.c.PropertySourceBootstrapConfiguration - [doInitialize,134] - Located property source: [BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket-dev.yml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket.yml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-application-dev.yml,DEFAULT_GROUP'}] diff --git a/logs/iot-box-websocket-api/warn.log b/logs/iot-box-websocket-api/warn.log index e8b1e7b..a86f3d2 100644 --- a/logs/iot-box-websocket-api/warn.log +++ b/logs/iot-box-websocket-api/warn.log @@ -436,3 +436,7 @@ Caused by: java.net.ConnectException: Connection refused (Connection refused) ... 51 common frames omitted 11:04:57.044 [com.alibaba.nacos.client.naming.updater] INFO c.a.n.client.naming - [processServiceJson,232] []- new ips(1) service: DEFAULT_GROUP@@qiuguo-iot-box-websocket@@DEFAULT -> [{"instanceId":"127.0.0.1#8080#DEFAULT#DEFAULT_GROUP@@qiuguo-iot-box-websocket","ip":"127.0.0.1","port":8080,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@qiuguo-iot-box-websocket","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000}] 11:04:57.045 [com.alibaba.nacos.client.naming.updater] INFO c.a.n.client.naming - [processServiceJson,271] []- current ips:(3) service: DEFAULT_GROUP@@qiuguo-iot-box-websocket@@DEFAULT -> [{"instanceId":"172.31.133.185#8080#DEFAULT#DEFAULT_GROUP@@qiuguo-iot-box-websocket","ip":"172.31.133.185","port":8080,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@qiuguo-iot-box-websocket","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000},{"instanceId":"127.0.0.1#8080#DEFAULT#DEFAULT_GROUP@@qiuguo-iot-box-websocket","ip":"127.0.0.1","port":8080,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@qiuguo-iot-box-websocket","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000},{"instanceId":"172.27.48.1#8080#DEFAULT#DEFAULT_GROUP@@qiuguo-iot-box-websocket","ip":"172.27.48.1","port":8080,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@qiuguo-iot-box-websocket","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000}] +11:07:20.648 [background-preinit] INFO o.h.v.i.util.Version - [,21] - HV000001: Hibernate Validator 6.2.5.Final +11:07:21.405 [main] WARN c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,87] - Ignore the empty nacos configuration and get it based on dataId[qiuguo-iot-box-websocket] & group[DEFAULT_GROUP] +11:07:21.415 [main] WARN c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,87] - Ignore the empty nacos configuration and get it based on dataId[qiuguo-iot-box-websocket-dev.yml] & group[DEFAULT_GROUP] +11:07:21.415 [main] INFO o.s.c.b.c.PropertySourceBootstrapConfiguration - [doInitialize,134] - Located property source: [BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket-dev.yml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket.yml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-application-dev.yml,DEFAULT_GROUP'}]