|
@@ -3,6 +3,8 @@ package thyyxxk.wxservice_server.controller;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
+import thyyxxk.wxservice_server.entity.ResultVo;
|
|
|
+import thyyxxk.wxservice_server.utils.ResultVoUtil;
|
|
|
import thyyxxk.wxservice_server.websocket.WebSocketServer;
|
|
|
|
|
|
/**
|
|
@@ -15,8 +17,9 @@ import thyyxxk.wxservice_server.websocket.WebSocketServer;
|
|
|
public class WebSocketController {
|
|
|
|
|
|
@GetMapping("/getOnlineCount")
|
|
|
- public Integer getOnlineCount() {
|
|
|
- return WebSocketServer.getOnlineCount();
|
|
|
+ public ResultVo<String> getOnlineCount() {
|
|
|
+ String data = "当前在线人数:" + WebSocketServer.getOnlineCount();
|
|
|
+ return ResultVoUtil.success(data);
|
|
|
}
|
|
|
|
|
|
}
|