DS
潘志宝
2024-08-23 0fbd01c6fe5386e454d4053df161b01e8b42f423
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
<?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 &gt;= #{params.startTime}
        </if>
        <if test="params.endTime != null and params.endTime != ''">
            and b.run_time &lt;= #{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>