<?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.chinaitop.depot.intelligent.ventilation.mapper.DataKcglKcswDefaultMapper">
  <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.ventilation.model.DataKcglKcswDefault">
    <id column="DataID" jdbcType="CHAR" property="dataid" />
    <result column="UnitID" jdbcType="CHAR" property="unitid" />
    <result column="PeriodID" jdbcType="CHAR" property="periodid" />
    <result column="RoundID" jdbcType="TINYINT" property="roundid" />
    <result column="ModifyDate" jdbcType="TIMESTAMP" property="modifydate" />
    <result column="builder" jdbcType="CHAR" property="builder" />
    <result column="lkmc" jdbcType="VARCHAR" property="lkmc" />
    <result column="lkbm" jdbcType="VARCHAR" property="lkbm" />
    <result column="hwxz" jdbcType="CHAR" property="hwxz" />
    <result column="ch" jdbcType="INTEGER" property="ch" />
    <result column="hwh" jdbcType="INTEGER" property="hwh" />
    <result column="pz" jdbcType="CHAR" property="pz" />
    <result column="mxpz" jdbcType="CHAR" property="mxpz" />
    <result column="dj" jdbcType="CHAR" property="dj" />
    <result column="rq" jdbcType="TIMESTAMP" property="rq" />
    <result column="wjh" jdbcType="VARCHAR" property="wjh" />
    <result column="kcsl" jdbcType="DOUBLE" property="kcsl" />
    <result column="cjsj" jdbcType="TIMESTAMP" property="cjsj" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    DataID, UnitID, PeriodID, RoundID, ModifyDate, builder, lkmc, lkbm, hwxz, ch, hwh, 
    pz, mxpz, dj, rq, wjh, kcsl, cjsj
  </sql>
  
  <select id="selectByExample" parameterType="com.chinaitop.depot.intelligent.ventilation.model.DataKcglKcswDefaultExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from lsreport_ts.data_kcgl_kcsw_default
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  
  
</mapper>