郑永安
2023-09-19 69185134fcfaf913ea45f1255677225a2cc311a4
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
<?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.gk.hotwork.Mapper.WarningInfoMapper" >
  <resultMap id="BaseResultMap" type="com.gk.hotwork.Domain.WarningInfo" >
    <!--          -->
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="type" property="type" jdbcType="VARCHAR" />
    <result column="content" property="content" jdbcType="VARCHAR" />
    <result column="createdat" property="createdat" jdbcType="TIMESTAMP" />
    <result column="taskcode" property="taskcode" jdbcType="VARCHAR" />
    <result column="worker" property="worker" jdbcType="VARCHAR" />
    <result column="isdeal" property="isdeal" jdbcType="TINYINT" />
    <result column="dealat" property="dealat" jdbcType="TIMESTAMP" />
    <result column="dealby" property="dealby" jdbcType="VARCHAR" />
    <result column="flag" property="flag" jdbcType="TINYINT" />
    <result column="issms" property="issms" jdbcType="TINYINT" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--          -->
    id, type, content, createdat, taskcode, worker, isdeal, dealat, dealby, flag, issms, tasktype
  </sql>
  <select id="selectTaskDataGrid" resultType="com.gk.hotwork.Domain.WarningInfo">
    select *
    from warning
    <where>
      tasktype = '动火作业'
      <if test="condition.code != null and condition.code != ''">
        and taskcode like concat('%',#{condition.code},'%')
      </if>
      <if test="condition.isDeal != null and condition.isDeal != ''">
        and isdeal = #{condition.isDeal}
      </if>
      <if test="condition.type != null and condition.type != ''">
        and type = #{condition.type}
      </if>
      <if test="condition.startTime != null and condition.startTime != ''">
        and createdat &gt;= #{condition.startTime}
      </if>
      <if test="condition.endTime != null and condition.endTime != ''">
        and createdat &lt;= #{condition.endTime}
      </if>
    </where>
  </select>
 
</mapper>