This commit is contained in:
zlwu committed 2025-08-05 14:00:23 +08:00
1 parent 109577a578
commit 4cf21648f5
10 files changed
+900 -11

No files matched your search

@@ -21,14 +21,15 @@ public class DbInitializer implements CommandLineRunner {
@Override
public void run(String... args) throws Exception {
try {
logger.info("开始执行数据库升级脚本...");
// 吴自龙 注释了
// logger.info("开始执行数据库升级脚本...");
// 执行升级脚本
sqlScriptRunner.executeScript("mapper/rs/update-rs-application-table.sql");
logger.info("数据库升级脚本执行完成");
// sqlScriptRunner.executeScript("mapper/rs/update-rs-application-table.sql");
// logger.info("数据库升级脚本执行完成");
} catch (Exception e) {
logger.error("执行数据库升级脚本失败", e);
// 这里选择记录错误但不中断应用启动,因为可能是表结构已经更新过
// 如果需要严格控制,可以抛出异常中断应用启动
}
}
}
}
@@ -98,7 +98,8 @@ public class XgStudentLeaveServiceImpl implements IXgStudentLeaveService {
private LambdaQueryWrapper<XgStudentLeave> buildQueryWrapper(XgStudentLeaveBo bo) {
Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<XgStudentLeave> lqw = Wrappers.lambdaQuery();
lqw.orderByAsc(XgStudentLeave::getId);
// lqw.orderByAsc(XgStudentLeave::getId);
lqw.orderByDesc(XgStudentLeave::getCreateTime);
lqw.eq(bo.getDeleted() != null, XgStudentLeave::getDeleted, bo.getDeleted());
lqw.eq(bo.getStudentId() != null, XgStudentLeave::getStudentId, bo.getStudentId());
lqw.like(StringUtils.isNotBlank(bo.getStudentName()), XgStudentLeave::getStudentName, bo.getStudentName());
@@ -112,8 +113,8 @@ public class XgStudentLeaveServiceImpl implements IXgStudentLeaveService {
lqw.eq(StringUtils.isNotBlank(bo.getLeaveTypeCode()), XgStudentLeave::getLeaveTypeCode, bo.getLeaveTypeCode());
lqw.like(StringUtils.isNotBlank(bo.getLeaveTypeName()), XgStudentLeave::getLeaveTypeName,
bo.getLeaveTypeName());
lqw.eq(bo.getStartTime() != null, XgStudentLeave::getStartTime, bo.getStartTime());
lqw.eq(bo.getEndTime() != null, XgStudentLeave::getEndTime, bo.getEndTime());
lqw.ge(bo.getStartTime() != null, XgStudentLeave::getStartTime, bo.getStartTime());
lqw.le(bo.getEndTime() != null, XgStudentLeave::getEndTime, bo.getEndTime());
lqw.eq(bo.getLeaveDuration() != null, XgStudentLeave::getLeaveDuration, bo.getLeaveDuration());
lqw.eq(StringUtils.isNotBlank(bo.getIsLeaveSchool()), XgStudentLeave::getIsLeaveSchool, bo.getIsLeaveSchool());
lqw.eq(StringUtils.isNotBlank(bo.getNeedCancel()), XgStudentLeave::getNeedCancel, bo.getNeedCancel());