auth-server-java/service/src/main/resources/mapper/SchedulersMapper.xml

51 lines
2.3 KiB
XML
Raw Normal View History

2024-10-14 20:54:54 +08:00
<?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.bunny.services.mapper.SchedulersMapper">
<!-- 通用查询映射结果 -->
2024-10-17 15:06:31 +08:00
<resultMap id="BaseResultMap" type="cn.bunny.dao.entity.quartz.Schedulers">
2024-10-15 15:23:59 +08:00
<id column="job_name" property="jobName"/>
<id column="job_group" property="jobGroup"/>
<id column="description" property="description"/>
<id column="job_class_name" property="jobClassName"/>
<id column="cron_expression" property="cronExpression"/>
<id column="trigger_name" property="triggerName"/>
<id column="trigger_state" property="triggerState"/>
2024-10-14 20:54:54 +08:00
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
job_name, job_group, description, job_class_name, cron_expression, trigger_name, trigger_state
</sql>
<!-- 分页查询Schedulers视图内容 -->
2024-10-17 15:06:31 +08:00
<select id="selectListByPage" resultType="cn.bunny.dao.entity.quartz.Schedulers">
select
<include refid="Base_Column_List"/>
2024-10-17 15:06:31 +08:00
from view_qrtz_schedulers
<where>
2024-10-15 15:23:59 +08:00
<if test="dto.jobName != null and dto.jobName != ''">
and job_name like CONCAT('%',#{dto.jobName},'%')
</if>
<if test="dto.jobGroup != null and dto.jobGroup != ''">
and job_group like CONCAT('%',#{dto.jobGroup},'%')
</if>
<if test="dto.description != null and dto.description != ''">
and description like CONCAT('%',#{dto.description},'%')
</if>
<if test="dto.jobClassName != null and dto.jobClassName != ''">
and job_class_name like CONCAT('%',#{dto.jobClassName},'%')
</if>
<if test="dto.triggerName != null and dto.triggerName != ''">
and trigger_name like CONCAT('%',#{dto.triggerName},'%')
</if>
<if test="dto.triggerState != null and dto.triggerState != ''">
and trigger_state like CONCAT('%',#{dto.triggerState},'%')
</if>
2024-10-15 16:53:55 +08:00
<if test="dto.jobMethodName != null and dto.jobMethodName != ''">
and job_method_name like CONCAT('%',#{dto.jobMethodName},'%')
</if>
</where>
</select>
2024-10-14 20:54:54 +08:00
</mapper>