Browse Source

保存课堂数据报错时打印参数

tags/正式3.14.2^2
王宁 3 months ago
parent
commit
e1c8d600e5

+ 2
- 2
sclass/src/main/java/com/xhkjedu/sclass/controller/classroom/ClassroomController.java View File

194
                 }
194
                 }
195
             });
195
             });
196
         });
196
         });
197
-        return classroomService.batchSaveClass(startclassList, stopclassList, savefileList
197
+        return classroomService.batchSaveClass(rooms,startclassList, stopclassList, savefileList
198
                 , askteacherList, askstudentList, signList
198
                 , askteacherList, askstudentList, signList
199
                 , paperList, nodename, stupaperList, paperFileList, paperQtypeList, paperScantronList, voteList, votestuList,profileList,profileStudentList);
199
                 , paperList, nodename, stupaperList, paperFileList, paperQtypeList, paperScantronList, voteList, votestuList,profileList,profileStudentList);
200
     }
200
     }
352
                 profileStudentList.add(stuProfile);
352
                 profileStudentList.add(stuProfile);
353
             }
353
             }
354
         }
354
         }
355
-        return classroomService.saveClass(startclass, stopclass, savefileList
355
+        return classroomService.saveClass(r,startclass, stopclass, savefileList
356
                 , askteacherList, askstudentList, signList
356
                 , askteacherList, askstudentList, signList
357
                 , paperList, nodename, stupaperList, paperFileList, paperQtypeList, paperScantronList, voteList, votestuList, profileList, profileStudentList);
357
                 , paperList, nodename, stupaperList, paperFileList, paperQtypeList, paperScantronList, voteList, votestuList, profileList, profileStudentList);
358
     }
358
     }

+ 7
- 4
sclass/src/main/java/com/xhkjedu/sclass/service/classroom/ClassroomService.java View File

7
 import com.xhkjedu.sclass.vo.classroom.*;
7
 import com.xhkjedu.sclass.vo.classroom.*;
8
 import com.xhkjedu.sclass.vo.paper.CheckClassVo;
8
 import com.xhkjedu.sclass.vo.paper.CheckClassVo;
9
 import com.xhkjedu.sclass.vo.room.DirectorVo;
9
 import com.xhkjedu.sclass.vo.room.DirectorVo;
10
+import com.xhkjedu.sclass.vo.room.RoomPVo;
10
 import com.xhkjedu.sclass.vo.room.RoomParamVo;
11
 import com.xhkjedu.sclass.vo.room.RoomParamVo;
11
 import com.xhkjedu.utils.N_Utils;
12
 import com.xhkjedu.utils.N_Utils;
12
 import com.xhkjedu.vo.ResultVo;
13
 import com.xhkjedu.vo.ResultVo;
561
      * @Date 2022/6/28 16:51
562
      * @Date 2022/6/28 16:51
562
      **/
563
      **/
563
     @Transactional(rollbackFor = Exception.class)
564
     @Transactional(rollbackFor = Exception.class)
564
-    public ResultVo batchSaveClass(List<TClassroom> startclassList, List<TClassroom> stopclassList
565
+    public ResultVo batchSaveClass(List<RoomPVo> rooms,List<TClassroom> startclassList, List<TClassroom> stopclassList
565
             , List<TClassroomFile> savefileList
566
             , List<TClassroomFile> savefileList
566
             , List<TClassroomAskteacher> askteacherList, List<TClassroomAskstudent> askstudentList
567
             , List<TClassroomAskteacher> askteacherList, List<TClassroomAskstudent> askstudentList
567
             , List<TClassroomSign> signList
568
             , List<TClassroomSign> signList
629
             resultVo.setMsg("保存成功");
630
             resultVo.setMsg("保存成功");
630
         } catch (Exception e) {
631
         } catch (Exception e) {
631
             log.error("批量保存课堂数据失败:" + e.getMessage());
632
             log.error("批量保存课堂数据失败:" + e.getMessage());
633
+            log.error(JSON.toJSONString(rooms));
632
             resultVo.setMsg("保存失败");
634
             resultVo.setMsg("保存失败");
633
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
635
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
634
         }
636
         }
781
      * @Date 2022/6/30 11:12
783
      * @Date 2022/6/30 11:12
782
      **/
784
      **/
783
     @Transactional(rollbackFor = Exception.class)
785
     @Transactional(rollbackFor = Exception.class)
784
-    public ResultVo saveClass(TClassroom startclass, TClassroom stopclass, List<TClassroomFile> savefileList
786
+    public ResultVo saveClass(RoomPVo r,TClassroom startclass, TClassroom stopclass, List<TClassroomFile> savefileList
785
             , List<TClassroomAskteacher> askteacherList, List<TClassroomAskstudent> askstudentList, List<TClassroomSign> signList
787
             , List<TClassroomAskteacher> askteacherList, List<TClassroomAskstudent> askstudentList, List<TClassroomSign> signList
786
             , List<TClassroomPaper> paperList, String nodename
788
             , List<TClassroomPaper> paperList, String nodename
787
             , List<TClassroomPaperStudent> stupaperList, List<TClassroomPaperFile> paperFileList
789
             , List<TClassroomPaperStudent> stupaperList, List<TClassroomPaperFile> paperFileList
788
             , List<TClassroomPaperQtype> paperQtypeList, List<TClassroomPaperScantron> paperScantronList
790
             , List<TClassroomPaperQtype> paperQtypeList, List<TClassroomPaperScantron> paperScantronList
789
-            ,List<TClassroomVote> voteList,List<TClassroomVoteStudent> votestuList
790
-            ,List<TClassroomProfile> profileList,List<TClassroomProfileStudent> profileStudentList) {
791
+            , List<TClassroomVote> voteList, List<TClassroomVoteStudent> votestuList
792
+            , List<TClassroomProfile> profileList, List<TClassroomProfileStudent> profileStudentList) {
791
 
793
 
792
         ResultVo resultVo = new ResultVo();
794
         ResultVo resultVo = new ResultVo();
793
         resultVo.setCode(1);
795
         resultVo.setCode(1);
847
             resultVo.setMsg("保存成功");
849
             resultVo.setMsg("保存成功");
848
         } catch (Exception e) {
850
         } catch (Exception e) {
849
             log.error("批量保存课堂数据失败:" + e.getMessage());
851
             log.error("批量保存课堂数据失败:" + e.getMessage());
852
+            log.error(JSON.toJSONString(r));
850
             resultVo.setMsg("保存失败");
853
             resultVo.setMsg("保存失败");
851
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
854
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
852
             return resultVo;
855
             return resultVo;

Loading…
Cancel
Save