update 加上科目内容

develop
hhb@hotmail.com 1 month ago
parent 4153162ff1
commit de621c8541

@ -188,7 +188,7 @@ public class TeacherServiceImpl implements TeacherService {
long startTimestamp = startDatetime.toInstant(ZoneOffset.UTC).toEpochMilli();
long endTimestamp = endDatetime.toInstant(ZoneOffset.UTC).toEpochMilli();
List<LessonRecord> lessonRecords = lessonRecordRepository.getLessonsByConditions(String.format(PK.PK_LESSON_RECORD, teacherDto.getCode()), startTimestamp, endTimestamp, teacherDto.getTmdId());
List<LessonRecord> lessonRecords = lessonRecordRepository.getLessonsByConditions(String.format(PK.PK_LESSON_RECORD, teacherDto.getCode()), startTimestamp, endTimestamp, teacherDto.getSubjectId(),teacherDto.getTmdId());
int[] counts = {0, 0, 0, 0, 0};
String[] keys = {"cooperation", "internet", "task", "exam", "diffential"};

@ -16,8 +16,9 @@ public interface LessonRecordRepository extends CosmosRepository<LessonRecord, S
"c.code = @code and " +
"(IS_NULL(@startTime) or c.startTime >= @startTime) and " +
"(IS_NULL(@endTime) or c.startTime <= @endTime) and"+
"(IS_NULL(@subjectId) or c.subjectId = @subjectId) and"+
" c.tmdid = @tmdId")
List<LessonRecord> getLessonsByConditions(String code, Long startTime, Long endTime,String tmdId);
List<LessonRecord> getLessonsByConditions(String code, Long startTime, Long endTime,String subjectId,String tmdId);
@Query("select * from LessonRecord as c where c.code = @code and c.expire<=0 and c.status<>404 and c.tmdid = @tmdId and " +
"(IS_NULL(@subjectId) or c.subjectId = @subjectId) ")

Loading…
Cancel
Save