<?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.weather.mapper.TWertherinfoMapper" >
  <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.weather.model.TWertherinfo" >
    <id column="id" property="id" jdbcType="VARCHAR" />
    <result column="org_id" property="orgId" jdbcType="VARCHAR" />
    <result column="sitecode" property="sitecode" jdbcType="VARCHAR" />
    <result column="vqxzcode" property="vqxzcode" jdbcType="VARCHAR" />
    <result column="vqxzname" property="vqxzname" jdbcType="VARCHAR" />
    <result column="ftemp" property="ftemp" jdbcType="DECIMAL" />
    <result column="fhumi" property="fhumi" jdbcType="DECIMAL" />
    <result column="fwinds" property="fwinds" jdbcType="DECIMAL" />
    <result column="fwindd" property="fwindd" jdbcType="DECIMAL" />
    <result column="fpressure" property="fpressure" jdbcType="DECIMAL" />
    <result column="frain" property="frain" jdbcType="DECIMAL" />
    <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
    <result column="data_source" property="dataSource" jdbcType="VARCHAR" />
    <result column="remark" property="remark" jdbcType="VARCHAR" />
    <result column="del_flag" property="delFlag" jdbcType="INTEGER" />
  </resultMap>
  <sql id="Example_Where_Clause" >
    <where >
      <foreach collection="oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <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 collection="criterion.value" item="listItem" open="(" close=")" 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="(" suffix=")" prefixOverrides="and" >
            <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List" >
    id, org_id, sitecode, vqxzcode, vqxzname, ftemp, fhumi, fwinds, fwindd, fpressure, 
    frain, updatetime, data_source, remark, del_flag
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.weather.model.TWertherinfoExample" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from t_wertherinfo
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null" >
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select 
    <include refid="Base_Column_List" />
    from t_wertherinfo
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
    delete from t_wertherinfo
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.weather.model.TWertherinfoExample" >
    delete from t_wertherinfo
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.chinaitop.depot.intelligent.weather.model.TWertherinfo" >
    insert into t_wertherinfo (id, org_id, sitecode, 
      vqxzcode, vqxzname, ftemp, 
      fhumi, fwinds, fwindd, 
      fpressure, frain, updatetime, 
      data_source, remark, del_flag
      )
    values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR}, #{sitecode,jdbcType=VARCHAR}, 
      #{vqxzcode,jdbcType=VARCHAR}, #{vqxzname,jdbcType=VARCHAR}, #{ftemp,jdbcType=DECIMAL}, 
      #{fhumi,jdbcType=DECIMAL}, #{fwinds,jdbcType=DECIMAL}, #{fwindd,jdbcType=DECIMAL}, 
      #{fpressure,jdbcType=DECIMAL}, #{frain,jdbcType=DECIMAL}, #{updatetime,jdbcType=TIMESTAMP}, 
      #{dataSource,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{delFlag,jdbcType=INTEGER}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.weather.model.TWertherinfo" >
    insert into t_wertherinfo
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="orgId != null" >
        org_id,
      </if>
      <if test="sitecode != null" >
        sitecode,
      </if>
      <if test="vqxzcode != null" >
        vqxzcode,
      </if>
      <if test="vqxzname != null" >
        vqxzname,
      </if>
      <if test="ftemp != null" >
        ftemp,
      </if>
      <if test="fhumi != null" >
        fhumi,
      </if>
      <if test="fwinds != null" >
        fwinds,
      </if>
      <if test="fwindd != null" >
        fwindd,
      </if>
      <if test="fpressure != null" >
        fpressure,
      </if>
      <if test="frain != null" >
        frain,
      </if>
      <if test="updatetime != null" >
        updatetime,
      </if>
      <if test="dataSource != null" >
        data_source,
      </if>
      <if test="remark != null" >
        remark,
      </if>
      <if test="delFlag != null" >
        del_flag,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null" >
        #{orgId,jdbcType=VARCHAR},
      </if>
      <if test="sitecode != null" >
        #{sitecode,jdbcType=VARCHAR},
      </if>
      <if test="vqxzcode != null" >
        #{vqxzcode,jdbcType=VARCHAR},
      </if>
      <if test="vqxzname != null" >
        #{vqxzname,jdbcType=VARCHAR},
      </if>
      <if test="ftemp != null" >
        #{ftemp,jdbcType=DECIMAL},
      </if>
      <if test="fhumi != null" >
        #{fhumi,jdbcType=DECIMAL},
      </if>
      <if test="fwinds != null" >
        #{fwinds,jdbcType=DECIMAL},
      </if>
      <if test="fwindd != null" >
        #{fwindd,jdbcType=DECIMAL},
      </if>
      <if test="fpressure != null" >
        #{fpressure,jdbcType=DECIMAL},
      </if>
      <if test="frain != null" >
        #{frain,jdbcType=DECIMAL},
      </if>
      <if test="updatetime != null" >
        #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="dataSource != null" >
        #{dataSource,jdbcType=VARCHAR},
      </if>
      <if test="remark != null" >
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="delFlag != null" >
        #{delFlag,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.weather.model.TWertherinfoExample" resultType="java.lang.Integer" >
    select count(*) from t_wertherinfo
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    update t_wertherinfo
    <set >
      <if test="record.id != null" >
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.orgId != null" >
        org_id = #{record.orgId,jdbcType=VARCHAR},
      </if>
      <if test="record.sitecode != null" >
        sitecode = #{record.sitecode,jdbcType=VARCHAR},
      </if>
      <if test="record.vqxzcode != null" >
        vqxzcode = #{record.vqxzcode,jdbcType=VARCHAR},
      </if>
      <if test="record.vqxzname != null" >
        vqxzname = #{record.vqxzname,jdbcType=VARCHAR},
      </if>
      <if test="record.ftemp != null" >
        ftemp = #{record.ftemp,jdbcType=DECIMAL},
      </if>
      <if test="record.fhumi != null" >
        fhumi = #{record.fhumi,jdbcType=DECIMAL},
      </if>
      <if test="record.fwinds != null" >
        fwinds = #{record.fwinds,jdbcType=DECIMAL},
      </if>
      <if test="record.fwindd != null" >
        fwindd = #{record.fwindd,jdbcType=DECIMAL},
      </if>
      <if test="record.fpressure != null" >
        fpressure = #{record.fpressure,jdbcType=DECIMAL},
      </if>
      <if test="record.frain != null" >
        frain = #{record.frain,jdbcType=DECIMAL},
      </if>
      <if test="record.updatetime != null" >
        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.dataSource != null" >
        data_source = #{record.dataSource,jdbcType=VARCHAR},
      </if>
      <if test="record.remark != null" >
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.delFlag != null" >
        del_flag = #{record.delFlag,jdbcType=INTEGER},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    update t_wertherinfo
    set id = #{record.id,jdbcType=VARCHAR},
      org_id = #{record.orgId,jdbcType=VARCHAR},
      sitecode = #{record.sitecode,jdbcType=VARCHAR},
      vqxzcode = #{record.vqxzcode,jdbcType=VARCHAR},
      vqxzname = #{record.vqxzname,jdbcType=VARCHAR},
      ftemp = #{record.ftemp,jdbcType=DECIMAL},
      fhumi = #{record.fhumi,jdbcType=DECIMAL},
      fwinds = #{record.fwinds,jdbcType=DECIMAL},
      fwindd = #{record.fwindd,jdbcType=DECIMAL},
      fpressure = #{record.fpressure,jdbcType=DECIMAL},
      frain = #{record.frain,jdbcType=DECIMAL},
      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
      data_source = #{record.dataSource,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      del_flag = #{record.delFlag,jdbcType=INTEGER}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.weather.model.TWertherinfo" >
    update t_wertherinfo
    <set >
      <if test="orgId != null" >
        org_id = #{orgId,jdbcType=VARCHAR},
      </if>
      <if test="sitecode != null" >
        sitecode = #{sitecode,jdbcType=VARCHAR},
      </if>
      <if test="vqxzcode != null" >
        vqxzcode = #{vqxzcode,jdbcType=VARCHAR},
      </if>
      <if test="vqxzname != null" >
        vqxzname = #{vqxzname,jdbcType=VARCHAR},
      </if>
      <if test="ftemp != null" >
        ftemp = #{ftemp,jdbcType=DECIMAL},
      </if>
      <if test="fhumi != null" >
        fhumi = #{fhumi,jdbcType=DECIMAL},
      </if>
      <if test="fwinds != null" >
        fwinds = #{fwinds,jdbcType=DECIMAL},
      </if>
      <if test="fwindd != null" >
        fwindd = #{fwindd,jdbcType=DECIMAL},
      </if>
      <if test="fpressure != null" >
        fpressure = #{fpressure,jdbcType=DECIMAL},
      </if>
      <if test="frain != null" >
        frain = #{frain,jdbcType=DECIMAL},
      </if>
      <if test="updatetime != null" >
        updatetime = #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="dataSource != null" >
        data_source = #{dataSource,jdbcType=VARCHAR},
      </if>
      <if test="remark != null" >
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="delFlag != null" >
        del_flag = #{delFlag,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.weather.model.TWertherinfo" >
    update t_wertherinfo
    set org_id = #{orgId,jdbcType=VARCHAR},
      sitecode = #{sitecode,jdbcType=VARCHAR},
      vqxzcode = #{vqxzcode,jdbcType=VARCHAR},
      vqxzname = #{vqxzname,jdbcType=VARCHAR},
      ftemp = #{ftemp,jdbcType=DECIMAL},
      fhumi = #{fhumi,jdbcType=DECIMAL},
      fwinds = #{fwinds,jdbcType=DECIMAL},
      fwindd = #{fwindd,jdbcType=DECIMAL},
      fpressure = #{fpressure,jdbcType=DECIMAL},
      frain = #{frain,jdbcType=DECIMAL},
      updatetime = #{updatetime,jdbcType=TIMESTAMP},
      data_source = #{dataSource,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      del_flag = #{delFlag,jdbcType=INTEGER}
    where id = #{id,jdbcType=VARCHAR}
  </update>
  
  <insert id="insertBatch" parameterType="java.util.List">
    insert into t_wertherinfo (id, org_id, sitecode,
    vqxzcode, vqxzname, ftemp,
    fhumi, fwinds, fwindd,
    fpressure, frain, updatetime,
    data_source, remark)
    values
    <foreach collection="list" item="weather" index="index" separator=",">
      (#{weather.id,jdbcType=VARCHAR}, #{weather.orgId,jdbcType=VARCHAR}, #{weather.sitecode,jdbcType=VARCHAR},
      #{weather.vqxzcode,jdbcType=VARCHAR}, #{weather.vqxzname,jdbcType=VARCHAR}, #{weather.ftemp,jdbcType=DECIMAL},
      #{weather.fhumi,jdbcType=DECIMAL}, #{weather.fwinds,jdbcType=DECIMAL}, #{weather.fwindd,jdbcType=DECIMAL},
      #{weather.fpressure,jdbcType=DECIMAL}, #{weather.frain,jdbcType=DECIMAL}, #{weather.updatetime,jdbcType=TIMESTAMP},
      #{weather.dataSource,jdbcType=VARCHAR}, #{weather.remark,jdbcType=VARCHAR})
    </foreach>
  </insert>
</mapper>