|
@@ -5,6 +5,7 @@ import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.biz.dal.dao.*;
|
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
|
+import com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType;
|
|
|
import com.ym.mec.biz.dal.enums.GroupType;
|
|
|
import com.ym.mec.biz.dal.enums.MessageTypeEnum;
|
|
|
import com.ym.mec.biz.dal.enums.YesOrNoEnum;
|
|
@@ -37,8 +38,6 @@ import java.time.temporal.ChronoUnit;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
-import com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType;
|
|
|
-
|
|
|
@Service
|
|
|
public class StudentCourseHomeworkServiceImpl extends BaseServiceImpl<Long, StudentCourseHomework> implements StudentCourseHomeworkService {
|
|
|
|
|
@@ -277,11 +276,11 @@ public class StudentCourseHomeworkServiceImpl extends BaseServiceImpl<Long, Stud
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<StudentCourseHomework> findStudentCourseHomeworkByCourse(Long courseSchedule, String userName) {
|
|
|
+ public List<StudentCourseHomework> findStudentCourseHomeworkByCourse(Long courseSchedule, Long homeworkId, String userName) {
|
|
|
if (Objects.isNull(courseSchedule)) {
|
|
|
throw new BizException("请指定课程");
|
|
|
}
|
|
|
- return studentCourseHomeworkDao.findByCourseSchedule(courseSchedule, userName);
|
|
|
+ return studentCourseHomeworkDao.findByCourseSchedule(courseSchedule, homeworkId, userName);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -479,4 +478,19 @@ public class StudentCourseHomeworkServiceImpl extends BaseServiceImpl<Long, Stud
|
|
|
pageInfo.setRows(dataList);
|
|
|
return pageInfo;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public PageInfo<EduHomeworkCardDto> getEduCourseHomeworkList(StudentCourseHomeWorkQueryInfo queryInfo) {
|
|
|
+ PageInfo<EduHomeworkCardDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
|
+ Map<String, Object> params = new HashMap<String, Object>();
|
|
|
+ MapUtil.populateMap(params, queryInfo);
|
|
|
+
|
|
|
+ int count = studentCourseHomeworkDao.countEduCourseHomeworkList(params);
|
|
|
+ pageInfo.setTotal(count);
|
|
|
+ params.put("offset", pageInfo.getOffset());
|
|
|
+ List<EduHomeworkCardDto> dataList = studentCourseHomeworkDao.getEduCourseHomeworkList(params);
|
|
|
+
|
|
|
+ pageInfo.setRows(dataList);
|
|
|
+ return pageInfo;
|
|
|
+ }
|
|
|
}
|