推送二维码被扫信息 消息格式修改

This commit is contained in:
15683799673
2025-09-13 13:46:06 +08:00
parent 26e31014b5
commit 53feebeec0
3 changed files with 10 additions and 6 deletions

View File

@@ -94,6 +94,10 @@ public class TbVisitorManagementController extends BaseController {
if (qrCodeInfo == null) {
return R.fail("二维码已过期");
}
// JSONObject jsonObject = new JSONObject();
// jsonObject.put("type", "qrcode");
// jsonObject.put("date", qrcode);
remoteWebSocketMessageService.publishMessage(List.of(qrCodeInfo.getUserid()), WebSocketMsgType.MOBILE_QRCODE, qrcode);
return R.ok("二维码可用");

View File

@@ -55,7 +55,7 @@ public class RemoteWebSocketMessageServiceImpl implements RemoteWebSocketMessage
private String createMsg(WebSocketMsgType webSocketMsgType, Object data) {
JSONObject msg = new JSONObject();
msg.put("code", webSocketMsgType.getCode());
msg.put("type", webSocketMsgType.getCode());
msg.put("data", data);
return msg.toJSONString();
}