This commit is contained in:
zlwu committed 2025-11-29 13:59:05 +08:00
1 parent 7d2c24d1c0
commit 67a826b813
2 files changed
+10 -1

No files matched your search

@@ -896,6 +896,9 @@ public class XgStudentMsgBatchServiceImpl implements IXgStudentMsgBatchService {
// 第二步:根据部门ID列表和条件分页查询学生信息批次数据
com.baomidou.mybatisplus.extension.plugins.pagination.Page<XgStudentMsgBatchVo> page = pageQuery
.build();
// 保证最终排序规则严格按照 Mapper XML 中的
// ORDER BY student_no DESC, create_time DESC 执行
pageQuery.disableDefaultOrder();
com.baomidou.mybatisplus.extension.plugins.pagination.Page<XgStudentMsgBatchVo> result = baseMapper
.selectPageByDeptIds(page, batchId, filteredDeptIds, name, studentNo, phone, infoStatus);
@@ -186,6 +186,10 @@ public class XgStudentMsgServiceImpl implements IXgStudentMsgService {
.map(String::valueOf)
.collect(Collectors.toList());
// 关闭 PageQuery 的默认排序(create_time desc),避免与 XML 中的 ORDER BY 冲突
// 保证最终排序规则严格按照 Mapper XML 中的
// ORDER BY student_no DESC, create_time DESC 执行
pageQuery.disableDefaultOrder();
Page<XgStudentMsgVo> result = baseMapper.selectPageByDeptIds(pageQuery.build(), lqw, classIdList);
return TableDataInfo.build(result);
}
@@ -726,7 +730,9 @@ public class XgStudentMsgServiceImpl implements IXgStudentMsgService {
List<String> classIdList = filteredDeptIds.stream()
.map(String::valueOf)
.collect(Collectors.toList());
// 保证最终排序规则严格按照 Mapper XML 中的
// ORDER BY student_no DESC, create_time DESC 执行
// pageQuery.disableDefaultOrder();
Page<XgStudentMsgVo> result = baseMapper.selectPageByDeptIds(
new Page<>(bo.getPageNum(), bo.getPageSize()), lqw, classIdList);
return TableDataInfo.build(result);