Selaa lähdekoodia

Merge branch 'feature_HW_20230331' of http://git.dayaedu.com/yonge/mec into master_saas

zouxuan 2 vuotta sitten
vanhempi
commit
a7312e1dc3

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentLessonExaminationDao.java

@@ -23,7 +23,8 @@ public interface StudentLessonExaminationDao extends BaseMapper<StudentLessonExa
 
     int findCount(Map<String, Object> params);
 
-    List<StudentLessonExaminationDto1> queryStudentPage(@Param("lessonExaminationId") Long lessonExaminationId);
+    List<StudentLessonExaminationDto1> queryStudentPage(@Param("lessonExaminationId") Long lessonExaminationId,
+                                                        @Param("subjectId") Integer subjectId);
 
     /**
      * 查询未完成的考试

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/StudentLessonExaminationService.java

@@ -32,6 +32,6 @@ public interface StudentLessonExaminationService extends IService<StudentLessonE
     */
     void submit(LessonExaminationSubmitDto submitDto);
 
-    List<StudentLessonExaminationDto1> queryStudentPage(Long lessonExaminationId);
+    List<StudentLessonExaminationDto1> queryStudentPage(Long lessonExaminationId,Integer subjectId);
 }
 

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentLessonExaminationServiceImpl.java

@@ -147,8 +147,8 @@ public class StudentLessonExaminationServiceImpl extends ServiceImpl<StudentLess
     }
 
     @Override
-    public List<StudentLessonExaminationDto1> queryStudentPage(Long lessonExaminationId) {
-        return baseMapper.queryStudentPage(lessonExaminationId);
+    public List<StudentLessonExaminationDto1> queryStudentPage(Long lessonExaminationId,Integer subjectId) {
+        return baseMapper.queryStudentPage(lessonExaminationId,subjectId);
     }
 }
 

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/StudentLessonExaminationMapper.xml

@@ -93,6 +93,9 @@
         left join sys_user su ON su.id_ = sle.user_id_
         left join subject sb ON sb.id_ = sle.subject_id_
         where sle.lesson_examination_id_ = #{lessonExaminationId}
+        <if test="subjectId != null">
+            AND sle.subject_id_ = #{subjectId}
+        </if>
         ORDER BY sle.training_score_ DESC
     </select>
 

+ 2 - 2
mec-web/src/main/java/com/ym/mec/web/controller/LessonExaminationController.java

@@ -38,8 +38,8 @@ public class LessonExaminationController extends BaseController {
 
     @ApiOperation(value = "获取作业学员列表")
     @PostMapping("queryStudentPage")
-    public HttpResponseResult<List<StudentLessonExaminationDto1>> queryStudentPage(Long lessonExaminationId) {
-        return succeed(studentLessonExaminationService.queryStudentPage(lessonExaminationId));
+    public HttpResponseResult<List<StudentLessonExaminationDto1>> queryStudentPage(Long lessonExaminationId,Integer subjectId) {
+        return succeed(studentLessonExaminationService.queryStudentPage(lessonExaminationId,subjectId));
     }
 
     @ApiOperation(value = "获取作业列表")