更新查询条件

develop
zhouj1203@hotmail.com 4 months ago
parent 1b67461abb
commit 0e38d74d08

@ -32,7 +32,7 @@ public class CommonServiceImpl implements CommonService {
try { try {
//获取当前学校该学段下详细信息 //获取当前学校该学段下详细信息
List<School.Period> period = schoolRepository.findPeriodById(gcDto.getSchoolId(), gcDto.getPeriodId()); List<School.Period> period = schoolRepository.findPeriodById(gcDto.getSchoolId(), gcDto.getPeriodId());
List<ClassInfo> classes = classRepository.findClassBySchoolIdAndPeriodId(gcDto.getSchoolId(), gcDto.getPeriodId()); List<ClassInfo> classes = classRepository.findClassBySchoolIdAndPeriodId(gcDto.getPeriodId());
int year = now().getYear(); int year = now().getYear();
Month month = now().getMonth(); Month month = now().getMonth();
int mon = MonthToNumberConverter.convertMonthToNumber(month.name()); int mon = MonthToNumberConverter.convertMonthToNumber(month.name());

@ -16,6 +16,4 @@ public class OverViewDto {
@ApiModelProperty("学生入学年") @ApiModelProperty("学生入学年")
private int studentYear; private int studentYear;
private List<String> classIds; private List<String> classIds;
private Long startTime;
private Long endTime;
} }

@ -18,6 +18,6 @@ public interface ClassRepository extends CosmosRepository<ClassInfo, String> {
@Query("select c.id, c.name from School as c where c.code = @code and c.id in (@ids)") @Query("select c.id, c.name from School as c where c.code = @code and c.id in (@ids)")
List<ClassInfo> findAllByCodeAndIdIn(String code, Collection<String> ids); List<ClassInfo> findAllByCodeAndIdIn(String code, Collection<String> ids);
@Query("select c.id, c.name,c.year,c.periodId from School as c where c.school = @school and c.periodId = @periodId and c.pk = 'Class'") @Query("select c.id, c.name,c.year,c.periodId from School as c where c.periodId = @periodId and c.pk = 'Class'")
List<ClassInfo> findClassBySchoolIdAndPeriodId(String school, String periodId); List<ClassInfo> findClassBySchoolIdAndPeriodId(String periodId);
} }

Loading…
Cancel
Save