<?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.landtool.lanbase.modules.log.dao.LogKettleJobDao">
|
|
<!-- 可根据自己的需求,是否要使用 -->
|
<resultMap type="com.landtool.lanbase.modules.log.entity.LogKettleJob" id="logMap">
|
<result property="idjob" column="IDJOB"/>
|
<result property="channelid" column="CHANNELID"/>
|
<result property="jobname" column="JOBNAME"/>
|
<result property="status" column="STATUS"/>
|
<result property="linesread" column="LINESREAD"/>
|
<result property="lineswritten" column="LINESWRITTEN"/>
|
<result property="linesupdated" column="LINESUPDATED"/>
|
<result property="linesinput" column="LINESINPUT"/>
|
<result property="linesoutput" column="LINESOUTPUT"/>
|
<result property="linesrejected" column="LINESREJECTED"/>
|
<result property="errors" column="ERRORS"/>
|
<result property="startdate" column="STARTDATE"/>
|
<result property="enddate" column="ENDDATE"/>
|
<result property="logdate" column="LOGDATE"/>
|
<result property="depdate" column="DEPDATE"/>
|
<result property="replaydate" column="REPLAYDATE"/>
|
<result property="executingserver" column="EXECUTINGSERVER"/>
|
<result property="executinguser" column="EXECUTINGUSER"/>
|
<result property="startjobentry" column="STARTJOBENTRY"/>
|
<result property="client" column="CLIENT"/>
|
</resultMap>
|
|
<select id="queryList" resultType="com.landtool.lanbase.modules.log.entity.LogKettleJob">
|
select * from (
|
SELECT *
|
FROM(
|
SELECT ROW_NUMBER() OVER(
|
ORDER BY B.ID_JOB DESC) AS rownumber,B.*
|
FROM (
|
SELECT * from LOG_KETTLE_JOB
|
<where>
|
<if test="jobname != null and jobname!=''">
|
AND jobname LIKE ('%' || #{jobname} || '%')
|
</if>
|
<if test="status != null and status!=''">
|
AND status = #{status}
|
</if>
|
<if test="logdatebegin != null and logdatebegin !=''">
|
<![CDATA[ AND logdate >= to_timestamp(#{logdatebegin,jdbcType=VARCHAR},'yyyy-mm-dd hh24:mi:ss') ]]>
|
</if>
|
<if test="logdatefinish != null and logdatefinish !=''">
|
<![CDATA[ AND logdate <= to_timestamp(#{logdatefinish,jdbcType=VARCHAR},'yyyy-mm-dd hh24:mi:ss') ]]>
|
</if>
|
</where>
|
) B
|
) A
|
WHERE rownumber > #{lowerOffset} AND <![CDATA[ rownumber <= ${upperOffset} ]]>
|
)a order by
|
<choose>
|
<when test="sidx != null and sidx != ''">
|
${sidx} ${order}
|
</when>
|
<otherwise>
|
ID_JOB DESC
|
</otherwise>
|
</choose>
|
</select>
|
<select id="queryTotal" resultType="int">
|
select count(*) from LOG_KETTLE_JOB
|
<where>
|
<if test="jobname != null and jobname!=''">
|
AND jobname LIKE ('%' || #{jobname} || '%')
|
</if>
|
<if test="status != null and status!=''">
|
AND status = #{status}
|
</if>
|
<if test="logdatebegin != null and logdatebegin !=''">
|
<![CDATA[ AND logdate >= to_timestamp(#{logdatebegin,jdbcType=VARCHAR},'yyyy-mm-dd hh24:mi:ss') ]]>
|
</if>
|
<if test="logdatefinish != null and logdatefinish !=''">
|
<![CDATA[ AND logdate <= to_timestamp(#{logdatefinish,jdbcType=VARCHAR},'yyyy-mm-dd hh24:mi:ss') ]]>
|
</if>
|
</where>
|
</select>
|
|
<select id="queryObject" resultType="com.landtool.lanbase.modules.log.entity.LogKettleJob">
|
select * from LOG_KETTLE_JOB where ID_JOB = #{value}
|
</select>
|
</mapper>
|