diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/job/JobLogMapper.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/job/JobLogMapper.java index fe196df35..c467498bf 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/job/JobLogMapper.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/job/JobLogMapper.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.infra.dal.mysql.job; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.infra.controller.admin.job.vo.log.JobLogExportReqVO; import cn.iocoder.yudao.module.infra.controller.admin.job.vo.log.JobLogPageReqVO; import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobLogDO; @@ -19,24 +19,24 @@ import java.util.List; public interface JobLogMapper extends BaseMapperX { default PageResult selectPage(JobLogPageReqVO reqVO) { - return selectPage(reqVO, new QueryWrapperX() - .eqIfPresent("job_id", reqVO.getJobId()) - .likeIfPresent("handler_name", reqVO.getHandlerName()) - .geIfPresent("begin_time", reqVO.getBeginTime()) - .leIfPresent("end_time", reqVO.getEndTime()) - .eqIfPresent("status", reqVO.getStatus()) - .orderByDesc("id") // ID 倒序 + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(JobLogDO::getJobId, reqVO.getJobId()) + .likeIfPresent(JobLogDO::getHandlerName, reqVO.getHandlerName()) + .geIfPresent(JobLogDO::getBeginTime, reqVO.getBeginTime()) + .leIfPresent(JobLogDO::getEndTime, reqVO.getEndTime()) + .eqIfPresent(JobLogDO::getStatus, reqVO.getStatus()) + .orderByDesc(JobLogDO::getId) // ID 倒序 ); } default List selectList(JobLogExportReqVO reqVO) { - return selectList(new QueryWrapperX() - .eqIfPresent("job_id", reqVO.getJobId()) - .likeIfPresent("handler_name", reqVO.getHandlerName()) - .geIfPresent("begin_time", reqVO.getBeginTime()) - .leIfPresent("end_time", reqVO.getEndTime()) - .eqIfPresent("status", reqVO.getStatus()) - .orderByDesc("id") // ID 倒序 + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(JobLogDO::getJobId, reqVO.getJobId()) + .likeIfPresent(JobLogDO::getHandlerName, reqVO.getHandlerName()) + .geIfPresent(JobLogDO::getBeginTime, reqVO.getBeginTime()) + .leIfPresent(JobLogDO::getEndTime, reqVO.getEndTime()) + .eqIfPresent(JobLogDO::getStatus, reqVO.getStatus()) + .orderByDesc(JobLogDO::getId) // ID 倒序 ); } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java index 3b693eb50..e3a352b8b 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java @@ -76,7 +76,7 @@ public class CodegenServiceImpl implements CodegenService { private Long createCodegen0(Long userId, Long dataSourceConfigId, TableInfo tableInfo) { // 校验导入的表和字段非空 - checkTableInfo(tableInfo); + validateTableInfo(tableInfo); // 校验是否已经存在 if (codegenTableMapper.selectByTableNameAndDataSourceConfigId(tableInfo.getName(), dataSourceConfigId) != null) { @@ -100,7 +100,7 @@ public class CodegenServiceImpl implements CodegenService { return table.getId(); } - private void checkTableInfo(TableInfo tableInfo) { + private void validateTableInfo(TableInfo tableInfo) { if (tableInfo == null) { throw exception(CODEGEN_IMPORT_TABLE_NULL); } @@ -149,7 +149,7 @@ public class CodegenServiceImpl implements CodegenService { private void syncCodegen0(Long tableId, TableInfo tableInfo) { // 校验导入的表和字段非空 - checkTableInfo(tableInfo); + validateTableInfo(tableInfo); List tableFields = tableInfo.getFields(); // 构建 CodegenColumnDO 数组,只同步新增的字段