<?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.iailab.module.mcs.dao.StModelRunlogDao">
|
<select id="getLastLog" parameterType="map" resultType="com.iailab.module.mcs.dto.StModelRunlogDTO">
|
select *
|
from t_st_model_runlog
|
where run_type = #{runType}
|
order by run_time desc
|
limit #{limit}
|
</select>
|
<delete id="cleanRunlogTask" parameterType="map">
|
delete
|
from t_st_model_runlog
|
where run_time between #{startdate} and #{enddate}
|
</delete>
|
<select id="queryList" resultType="com.iailab.module.mcs.dto.StModelRunlogDTO" parameterType="map">
|
SELECT a.model_code,a.model_name,b.* FROM t_st_model a,t_st_model_runlog b
|
where a.id = b.modelid
|
<if test="params.modelCode != null and params.modelCode != ''">
|
and a.model_code LIKE concat(concat("%",#{params.modelCode}),"%")
|
</if>
|
<if test="params.modelName != null and params.modelName != ''">
|
and a.model_name LIKE concat(concat("%",#{params.modelName}),"%")
|
</if>
|
<if test="params.startTime != null and params.startTime != ''">
|
and b.run_time >= #{params.startTime}
|
</if>
|
<if test="params.endTime != null and params.endTime != ''">
|
and b.run_time <= #{params.endTime}
|
</if>
|
order by b.run_time desc
|
</select>
|
<select id="listAll" resultType="com.iailab.module.mcs.dto.StModelRunlogDTO" parameterType="map">
|
SELECT a.model_code,a.model_name,b.* FROM t_st_model a,t_st_model_runlog b
|
where a.id = b.modelid
|
<if test="modelCode != null and modelCode != ''">
|
and a.model_code LIKE concat(concat("%",#{modelCode}),"%")
|
</if>
|
<if test="modelName != null and modelName != ''">
|
and a.model_name LIKE concat(concat("%",#{modelName}),"%")
|
</if>
|
order by b.run_time desc
|
</select>
|
|
|
</mapper>
|