郑永安
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
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.gk.hotwork.Mapper.GasWarnInfoMapper" >
  <resultMap id="BaseResultMap" type="com.gk.hotwork.Domain.GasWarnInfo" >
    <!--          -->
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="gastype" property="gastype" jdbcType="VARCHAR" />
    <result column="warntype" property="warntype" jdbcType="VARCHAR" />
    <result column="max" property="max" jdbcType="DECIMAL" />
    <result column="min" property="min" jdbcType="DECIMAL" />
    <result column="gasunit" property="gasunit" jdbcType="VARCHAR" />
    <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
    <result column="updateby" property="updateby" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--          -->
    id, gastype, warntype, max, min, gasunit, updatetime, updateby
  </sql>
  <select id="selectDataGrid" resultType="com.gk.hotwork.Domain.GasWarnInfo">
    select *
    from gaswarn
    <where>
      1=1
      <if test="condition.gastype != null and condition.gastype !=''">
        and gastype = #{condition.gastype}
      </if>
      <if test="condition.warntype != null and condition.warntype !=''">
        and warntype = #{condition.warntype}
      </if>
    </where>
  </select>
  <select id="selectExistByType" resultType="com.gk.hotwork.Domain.GasWarnInfo">
    select * from gaswarn
    where
    gastype = #{gastype}
    and warntype = #{warntype}
    <if test="id !=null">
      and id != #{id}
    </if>
  </select>
  <select id="selectByType" resultType="com.gk.hotwork.Domain.GasWarnInfo">
    select * from gaswarn
    where
    gastype = #{gastype}
    and warntype = #{warntype}
  </select>
</mapper>