he2802 2 vuotta sitten
vanhempi
commit
4d90870958

+ 3 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserStudyRecordServiceImpl.java

@@ -728,7 +728,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                         classSectionVo.setType(3L);
                         sectionList.add(classSectionVo);
                     }
-                    List<ClassPeriodSectionVo> cExamList= classGradeUserMapper.listperiodExam(classChapterVo.getId(), null, classPeriodVo.getCourseId(), null, classPeriodVo.getId());
+                    List<ClassPeriodSectionVo> cExamList= classGradeUserMapper.listperiodExam(classChapterVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), classPeriodVo.getId());
                     for (ClassPeriodSectionVo sectionVo : cExamList) {
                         ClassPeriodVo classSectionVo = BeanUtil.toBean(sectionVo,ClassPeriodVo.class);
                         classSectionVo.setType(4L);
@@ -736,7 +736,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                         sectionList.add(classSectionVo);
                     }
                 }
-                List<ClassPeriodChapterVo> mExamList =  classGradeUserMapper.listperiodModuleExam( null, classPeriodVo.getCourseId(), null, classPeriodVo.getId());
+                List<ClassPeriodChapterVo> mExamList =  classGradeUserMapper.listperiodModuleExam( bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), classPeriodVo.getId());
                 for (ClassPeriodChapterVo chapterVo : mExamList) {
                     ClassPeriodVo classSectionVo = BeanUtil.toBean(chapterVo,ClassPeriodVo.class);
                     classSectionVo.setType(5L);
@@ -758,7 +758,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                     classSectionVo.setType(3L);
                     sectionList.add(classSectionVo);
                 }
-                List<ClassPeriodSectionVo> cExamList= classGradeUserMapper.listperiodExam(classPeriodVo.getId(), null, classPeriodVo.getCourseId(), null, 0L);
+                List<ClassPeriodSectionVo> cExamList= classGradeUserMapper.listperiodExam(classPeriodVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), 0L);
                 for (ClassPeriodSectionVo sectionVo : cExamList) {
                     ClassPeriodVo classSectionVo = BeanUtil.toBean(sectionVo,ClassPeriodVo.class);
                     classSectionVo.setType(4L);

+ 6 - 4
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml

@@ -1022,16 +1022,18 @@
         SELECT
         cme.exam_id as id,
         cme.course_id,
-        (SELECT u.realname FROM `user` u where 1=1
+
         <if test="userId != null and userId !='' ">
+            (SELECT u.realname FROM `user` u where 1=1
             and u.user_id = #{userId}
+            ) as realname,
         </if>
-        ) as realname,
-        (SELECT u.user_id FROM `user` u where 1=1
         <if test="userId != null and userId !='' ">
+            (SELECT u.user_id FROM `user` u where 1=1
             and u.user_id = #{userId}
+            ) as user_id,
         </if>
-        ) as user_id,
+
         (SELECT e.exam_name FROM exam e where cme.exam_id = e.exam_id) as type_name,
         null as class_hours,
         4 as type