fuliqi
2024-07-04 c0792dcbc27d0580d9ed0e7aa3cf34c96c651840
src/main/java/com/ycl/jxkg/service/impl/ExamServiceImpl.java
@@ -885,6 +885,9 @@
        WebsocketDataVO websocket = new WebsocketDataVO();
        websocket.setCommend(WebsocketCommendEnum.DELAYED.getCommend());
        websocket.setData(form);
        if (! websocketServer.checkUserOnline(form.getUserId())) {
            throw new RuntimeException("该学员不在线,无法执行该操作");
        }
        // 发送websocket消息
        websocketServer.sendOneMessage(form.getUserId(), JSON.toJSONString(form));
        return Result.ok("操作成功");
@@ -895,6 +898,9 @@
        WebsocketDataVO websocket = new WebsocketDataVO();
        websocket.setCommend(WebsocketCommendEnum.FORCE_SUBMIT.getCommend());
        websocket.setData(form);
        if (! websocketServer.checkUserOnline(form.getUserId())) {
            throw new RuntimeException("该学员不在线,无法执行该操作");
        }
        // 发送websocket消息
        websocketServer.sendOneMessage(form.getUserId(), JSON.toJSONString(form));
        return Result.ok("操作成功");