fuliqi
2024-07-04 c0792dcbc27d0580d9ed0e7aa3cf34c96c651840
src/main/java/com/ycl/jxkg/service/impl/ExamServiceImpl.java
@@ -10,6 +10,7 @@
import com.ycl.jxkg.base.Result;
import com.ycl.jxkg.base.SystemCode;
import com.ycl.jxkg.context.WebContext;
import com.ycl.jxkg.domain.base.AbsVo;
import com.ycl.jxkg.domain.entity.*;
import com.ycl.jxkg.domain.exam.PaperFixQuestionDTO;
import com.ycl.jxkg.domain.exam.PaperQuestion;
@@ -117,6 +118,7 @@
        if (baseMapper.updateById(entity) > 0) {
            this.sendMQ(entity, entity.getUpdateVersion() + 1);
        }
        return Result.ok("修改成功");
    }
@@ -883,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("操作成功");
@@ -893,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("操作成功");