소스 검색

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

tags/正式3.14.2^2
王宁 3 달 전
부모
커밋
e1c8d600e5

+ 2
- 2
sclass/src/main/java/com/xhkjedu/sclass/controller/classroom/ClassroomController.java 파일 보기

@@ -194,7 +194,7 @@ public class ClassroomController {
194 194
                 }
195 195
             });
196 196
         });
197
-        return classroomService.batchSaveClass(startclassList, stopclassList, savefileList
197
+        return classroomService.batchSaveClass(rooms,startclassList, stopclassList, savefileList
198 198
                 , askteacherList, askstudentList, signList
199 199
                 , paperList, nodename, stupaperList, paperFileList, paperQtypeList, paperScantronList, voteList, votestuList,profileList,profileStudentList);
200 200
     }
@@ -352,7 +352,7 @@ public class ClassroomController {
352 352
                 profileStudentList.add(stuProfile);
353 353
             }
354 354
         }
355
-        return classroomService.saveClass(startclass, stopclass, savefileList
355
+        return classroomService.saveClass(r,startclass, stopclass, savefileList
356 356
                 , askteacherList, askstudentList, signList
357 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 파일 보기

@@ -7,6 +7,7 @@ import com.xhkjedu.sclass.utils.ArithUtil;
7 7
 import com.xhkjedu.sclass.vo.classroom.*;
8 8
 import com.xhkjedu.sclass.vo.paper.CheckClassVo;
9 9
 import com.xhkjedu.sclass.vo.room.DirectorVo;
10
+import com.xhkjedu.sclass.vo.room.RoomPVo;
10 11
 import com.xhkjedu.sclass.vo.room.RoomParamVo;
11 12
 import com.xhkjedu.utils.N_Utils;
12 13
 import com.xhkjedu.vo.ResultVo;
@@ -561,7 +562,7 @@ public class ClassroomService {
561 562
      * @Date 2022/6/28 16:51
562 563
      **/
563 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 566
             , List<TClassroomFile> savefileList
566 567
             , List<TClassroomAskteacher> askteacherList, List<TClassroomAskstudent> askstudentList
567 568
             , List<TClassroomSign> signList
@@ -629,6 +630,7 @@ public class ClassroomService {
629 630
             resultVo.setMsg("保存成功");
630 631
         } catch (Exception e) {
631 632
             log.error("批量保存课堂数据失败:" + e.getMessage());
633
+            log.error(JSON.toJSONString(rooms));
632 634
             resultVo.setMsg("保存失败");
633 635
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
634 636
         }
@@ -781,13 +783,13 @@ public class ClassroomService {
781 783
      * @Date 2022/6/30 11:12
782 784
      **/
783 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 787
             , List<TClassroomAskteacher> askteacherList, List<TClassroomAskstudent> askstudentList, List<TClassroomSign> signList
786 788
             , List<TClassroomPaper> paperList, String nodename
787 789
             , List<TClassroomPaperStudent> stupaperList, List<TClassroomPaperFile> paperFileList
788 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 794
         ResultVo resultVo = new ResultVo();
793 795
         resultVo.setCode(1);
@@ -847,6 +849,7 @@ public class ClassroomService {
847 849
             resultVo.setMsg("保存成功");
848 850
         } catch (Exception e) {
849 851
             log.error("批量保存课堂数据失败:" + e.getMessage());
852
+            log.error(JSON.toJSONString(r));
850 853
             resultVo.setMsg("保存失败");
851 854
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
852 855
             return resultVo;

Loading…
취소
저장