qirong
2023-11-29 13f796dc50449ae2ec525ef02aaf4b49a91a564b
src/main/java/com/mindskip/xzs/service/impl/ExamTemplatesServiceImpl.java
@@ -152,20 +152,20 @@
    @Override
    public Integer randomExam1(User user, Integer templatesId) throws Exception {
        ExamTemplatesUserCount count = new ExamTemplatesUserCount();
//        ExamTemplatesUserCount count = new ExamTemplatesUserCount();
        ExamPaperEditRequestVM vm = restore(templatesId);
        count.setExamTemplatesId(vm.getId());
//        count.setExamTemplatesId(vm.getId());
        Integer[] id = {user.getId()};
        vm.setUserIds(id);
        vm.setType("1");
        vm.setId(null);
        ExamPaper examPaper = examPaperService.savePaperFromVM(vm, user);
        ExamPaperEditRequestVM newVM = examPaperService.examPaperToVM(examPaper.getId());
        count.setExamPaperId(examPaper.getId());
        count.setUserId(user.getId());
        examTemplatesUserCountService.add(count);
        return count.getExamPaperId();
//        count.setExamPaperId(examPaper.getId());
//        count.setUserId(user.getId());
//        examTemplatesUserCountService.add(count);
        return examPaper.getId();
    }
    @Override