浏览代码

fix:课表列表当前页超过总页数报错

Joburgess 4 年之前
父节点
当前提交
36ebdfbd86

+ 0 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -4393,7 +4393,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         if (count > 0) {
             pageInfo.setTotal(count);
 			params.put("offset", pageInfo.getOffset());
-			MapUtil.populateMap(params, queryInfo);
             results = courseScheduleDao.endFindCourseSchedules(params);
             List<Long> courseScheduleIds = results.stream().map(CourseScheduleEndDto::getId).collect(Collectors.toList());
             //Map<Long, String> studentIdMap = MapUtil.convertIntegerMap(courseScheduleStudentPaymentDao.getStudentIdMap(courseScheduleIds));

+ 1 - 0
mec-common/common-core/src/main/java/com/ym/mec/common/page/PageInfo.java

@@ -134,6 +134,7 @@ public class PageInfo<T> implements Serializable {
 		this.totalPage=new BigDecimal(total).divide(new BigDecimal(limit),0,BigDecimal.ROUND_CEILING).intValue();
 		if(this.pageNo>total){
 			this.pageNo = total;
+			this.offset = (this.pageNo - 1) * this.limit;
 		}
 	}