upd: 编码规范
This commit is contained in:
@@ -26,7 +26,7 @@ public class JobRunner implements ApplicationRunner {
|
||||
*/
|
||||
@Override
|
||||
public void run(ApplicationArguments applicationArguments) {
|
||||
List<QuartzJob> quartzJobs = quartzJobMapper.selectActiveJob();
|
||||
List<QuartzJob> quartzJobs = quartzJobMapper.findActiveQuartzJobs();
|
||||
quartzJobs.forEach(quartzManage::addJob);
|
||||
log.info("Timing task injection complete");
|
||||
}
|
||||
|
||||
@@ -7,17 +7,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface QuartzJobMapper extends BaseMapper<QuartzJob> {
|
||||
|
||||
IPage<QuartzJob> selectByPage(@Param("criteria") QuartzJobQueryCriteria criteria, Page<Object> page);
|
||||
|
||||
List<QuartzJob> selectByPage(@Param("criteria") QuartzJobQueryCriteria criteria);
|
||||
|
||||
@Select("SELECT * FROM sys_quartz_job WHERE is_pause = 0")
|
||||
List<QuartzJob> selectActiveJob();
|
||||
IPage<QuartzJob> findQuartzJob(@Param("criteria") QuartzJobQueryCriteria criteria, Page<Object> page);
|
||||
List<QuartzJob> findQuartzJob(@Param("criteria") QuartzJobQueryCriteria criteria);
|
||||
List<QuartzJob> findActiveQuartzJobs();
|
||||
}
|
||||
|
||||
@@ -13,8 +13,6 @@ import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface QuartzLogMapper extends BaseMapper<QuartzLog> {
|
||||
|
||||
IPage<QuartzLog> selectByPage(@Param("criteria") QuartzJobQueryCriteria criteria, Page<Object> page);
|
||||
|
||||
List<QuartzLog> selectByPage(@Param("criteria") QuartzJobQueryCriteria criteria);
|
||||
IPage<QuartzLog> findQuartzLog(@Param("criteria") QuartzJobQueryCriteria criteria, Page<Object> page);
|
||||
List<QuartzLog> findQuartzLog(@Param("criteria") QuartzJobQueryCriteria criteria);
|
||||
}
|
||||
|
||||
@@ -33,22 +33,22 @@ public class QuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob
|
||||
|
||||
@Override
|
||||
public PageResult<QuartzJob> queryAll(QuartzJobQueryCriteria criteria, Page<Object> page) {
|
||||
return PageUtil.toPage(quartzJobMapper.selectByPage(criteria, page));
|
||||
return PageUtil.toPage(quartzJobMapper.findQuartzJob(criteria, page));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<QuartzLog> queryAllLog(QuartzJobQueryCriteria criteria, Page<Object> page) {
|
||||
return PageUtil.toPage(quartzLogMapper.selectByPage(criteria, page));
|
||||
return PageUtil.toPage(quartzLogMapper.findQuartzLog(criteria, page));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QuartzJob> queryAll(QuartzJobQueryCriteria criteria) {
|
||||
return quartzJobMapper.selectByPage(criteria);
|
||||
return quartzJobMapper.findQuartzJob(criteria);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QuartzLog> queryAllLog(QuartzJobQueryCriteria criteria) {
|
||||
return quartzLogMapper.selectByPage(criteria);
|
||||
return quartzLogMapper.findQuartzLog(criteria);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="cn.odboy.mapper.QuartzJobMapper">
|
||||
<select id="selectByPage" resultType="cn.odboy.model.job.domain.QuartzJob">
|
||||
<select id="findQuartzJob" resultType="cn.odboy.model.job.domain.QuartzJob">
|
||||
SELECT
|
||||
*
|
||||
FROM sys_quartz_job
|
||||
@@ -15,4 +15,7 @@
|
||||
</where>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
<select id="findActiveQuartzJobs" resultType="cn.odboy.model.job.domain.QuartzJob">
|
||||
SELECT * FROM sys_quartz_job WHERE is_pause = 0
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="cn.odboy.mapper.QuartzLogMapper">
|
||||
<select id="selectByPage" resultType="cn.odboy.model.job.domain.QuartzLog">
|
||||
<select id="findQuartzLog" resultType="cn.odboy.model.job.domain.QuartzLog">
|
||||
SELECT
|
||||
*
|
||||
FROM sys_quartz_log
|
||||
|
||||
Reference in New Issue
Block a user