|
@@ -1,6 +1,7 @@
|
|
|
package com.yhlxj.web.wss;
|
|
package com.yhlxj.web.wss;
|
|
|
|
|
|
|
|
import cn.hutool.json.JSONObject;
|
|
import cn.hutool.json.JSONObject;
|
|
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.yhlxj.dao.model.enums.WsMessageTypeEnum;
|
|
import com.yhlxj.dao.model.enums.WsMessageTypeEnum;
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
import lombok.Data;
|
|
@@ -36,7 +37,7 @@ public class WssSession implements WssSendable , Serializable {
|
|
|
//组织成形如 message:{"type":"type", "data":{...}}想
|
|
//组织成形如 message:{"type":"type", "data":{...}}想
|
|
|
JSONObject result = new JSONObject();
|
|
JSONObject result = new JSONObject();
|
|
|
result.putOpt("type", type.type);
|
|
result.putOpt("type", type.type);
|
|
|
- result.putOpt("content", object);
|
|
|
|
|
|
|
+ result.putOpt("content", JSONUtil.toJsonStr(object));
|
|
|
|
|
|
|
|
logger.info("[WS-SENDMESSAGE],{}", WsMessageTypeEnum.MESSAGE.type + ":" + result.toString());
|
|
logger.info("[WS-SENDMESSAGE],{}", WsMessageTypeEnum.MESSAGE.type + ":" + result.toString());
|
|
|
try {
|
|
try {
|