ScheduleJobLogDao.xml
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?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="com.gxb.modules.job.dao.ScheduleJobLogDao">
<select id="queryObject" resultType="com.gxb.modules.job.entity.ScheduleJobLogEntity" >
select * from schedule_job_log where log_id = #{value}
</select>
<select id="queryList" resultType="com.gxb.modules.job.entity.ScheduleJobLogEntity" >
select * from schedule_job_log
<where>
<if test="jobId != null and jobId.trim() != ''">
and job_id = #{jobId}
</if>
</where>
order by log_id desc
<if test="offset != null and limit != null ">
limit #{offset}, #{limit}
</if>
</select>
<select id="queryTotal" resultType="int">
select count(1) from schedule_job_log
<where>
<if test="jobId != null and jobId.trim() != ''">
and job_id = #{jobId}
</if>
</where>
</select>
<insert id="save" parameterType="com.gxb.modules.job.entity.ScheduleJobLogEntity">
insert into schedule_job_log
(
`job_id`,
`bean_name`,
`method_name`,
`params`,
`status`,
`error`,
`times`,
`create_time`
)
values
(
#{jobId},
#{beanName},
#{methodName},
#{params},
#{status},
#{error},
#{times},
#{createTime}
)
</insert>
</mapper>