<?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.grainsituation.mapper.TLqdataAddMapper" >
  <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.grainsituation.model.TLqdataAdd" >
    <id column="id" property="id" jdbcType="VARCHAR" />
    <result column="v_lq_data_id" property="vLqDataId" jdbcType="INTEGER" />
    <result column="i_floor_num" property="iFloorNum" jdbcType="INTEGER" />
    <result column="f_max_f_data" property="fMaxFData" jdbcType="DECIMAL" />
    <result column="f_min_f_data" property="fMinFData" jdbcType="DECIMAL" />
    <result column="f_avg_f_data" property="fAvgFData" jdbcType="DECIMAL" />
    <result column="f_max_around" property="fMaxAround" jdbcType="DECIMAL" />
    <result column="f_min_ around" property="fMinAround" jdbcType="DECIMAL" />
    <result column="f_avg_ around" property="fAvgAround" jdbcType="DECIMAL" />
    <result column="f_max_center" property="fMaxCenter" jdbcType="DECIMAL" />
    <result column="f_min_center" property="fMinCenter" jdbcType="DECIMAL" />
    <result column="f_avg_center" property="fAvgCenter" jdbcType="DECIMAL" />
  </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, v_lq_data_id, i_floor_num, f_max_f_data, f_min_f_data, f_avg_f_data, f_max_around, 
    "f_min_ around", "f_avg_ around", f_max_center, f_min_center, f_avg_center
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLqdataAddExample" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from t_lqdata_add
    <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_lqdata_add
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
    delete from t_lqdata_add
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLqdataAddExample" >
    delete from t_lqdata_add
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLqdataAdd" >
    insert into t_lqdata_add (id, v_lq_data_id, i_floor_num, 
      f_max_f_data, f_min_f_data, f_avg_f_data, 
      f_max_around, "f_min_ around", "f_avg_ around", 
      f_max_center, f_min_center, f_avg_center
      )
    values (#{id,jdbcType=VARCHAR}, #{vLqDataId,jdbcType=INTEGER}, #{iFloorNum,jdbcType=INTEGER}, 
      #{fMaxFData,jdbcType=DECIMAL}, #{fMinFData,jdbcType=DECIMAL}, #{fAvgFData,jdbcType=DECIMAL}, 
      #{fMaxAround,jdbcType=DECIMAL}, #{fMinAround,jdbcType=DECIMAL}, #{fAvgAround,jdbcType=DECIMAL}, 
      #{fMaxCenter,jdbcType=DECIMAL}, #{fMinCenter,jdbcType=DECIMAL}, #{fAvgCenter,jdbcType=DECIMAL}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLqdataAdd" >
    insert into t_lqdata_add
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="vLqDataId != null" >
        v_lq_data_id,
      </if>
      <if test="iFloorNum != null" >
        i_floor_num,
      </if>
      <if test="fMaxFData != null" >
        f_max_f_data,
      </if>
      <if test="fMinFData != null" >
        f_min_f_data,
      </if>
      <if test="fAvgFData != null" >
        f_avg_f_data,
      </if>
      <if test="fMaxAround != null" >
        f_max_around,
      </if>
      <if test="fMinAround != null" >
        "f_min_ around",
      </if>
      <if test="fAvgAround != null" >
        "f_avg_ around",
      </if>
      <if test="fMaxCenter != null" >
        f_max_center,
      </if>
      <if test="fMinCenter != null" >
        f_min_center,
      </if>
      <if test="fAvgCenter != null" >
        f_avg_center,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="vLqDataId != null" >
        #{vLqDataId,jdbcType=INTEGER},
      </if>
      <if test="iFloorNum != null" >
        #{iFloorNum,jdbcType=INTEGER},
      </if>
      <if test="fMaxFData != null" >
        #{fMaxFData,jdbcType=DECIMAL},
      </if>
      <if test="fMinFData != null" >
        #{fMinFData,jdbcType=DECIMAL},
      </if>
      <if test="fAvgFData != null" >
        #{fAvgFData,jdbcType=DECIMAL},
      </if>
      <if test="fMaxAround != null" >
        #{fMaxAround,jdbcType=DECIMAL},
      </if>
      <if test="fMinAround != null" >
        #{fMinAround,jdbcType=DECIMAL},
      </if>
      <if test="fAvgAround != null" >
        #{fAvgAround,jdbcType=DECIMAL},
      </if>
      <if test="fMaxCenter != null" >
        #{fMaxCenter,jdbcType=DECIMAL},
      </if>
      <if test="fMinCenter != null" >
        #{fMinCenter,jdbcType=DECIMAL},
      </if>
      <if test="fAvgCenter != null" >
        #{fAvgCenter,jdbcType=DECIMAL},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLqdataAddExample" resultType="java.lang.Integer" >
    select count(*) from t_lqdata_add
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    update t_lqdata_add
    <set >
      <if test="record.id != null" >
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.vLqDataId != null" >
        v_lq_data_id = #{record.vLqDataId,jdbcType=INTEGER},
      </if>
      <if test="record.iFloorNum != null" >
        i_floor_num = #{record.iFloorNum,jdbcType=INTEGER},
      </if>
      <if test="record.fMaxFData != null" >
        f_max_f_data = #{record.fMaxFData,jdbcType=DECIMAL},
      </if>
      <if test="record.fMinFData != null" >
        f_min_f_data = #{record.fMinFData,jdbcType=DECIMAL},
      </if>
      <if test="record.fAvgFData != null" >
        f_avg_f_data = #{record.fAvgFData,jdbcType=DECIMAL},
      </if>
      <if test="record.fMaxAround != null" >
        f_max_around = #{record.fMaxAround,jdbcType=DECIMAL},
      </if>
      <if test="record.fMinAround != null" >
        "f_min_ around" = #{record.fMinAround,jdbcType=DECIMAL},
      </if>
      <if test="record.fAvgAround != null" >
        "f_avg_ around" = #{record.fAvgAround,jdbcType=DECIMAL},
      </if>
      <if test="record.fMaxCenter != null" >
        f_max_center = #{record.fMaxCenter,jdbcType=DECIMAL},
      </if>
      <if test="record.fMinCenter != null" >
        f_min_center = #{record.fMinCenter,jdbcType=DECIMAL},
      </if>
      <if test="record.fAvgCenter != null" >
        f_avg_center = #{record.fAvgCenter,jdbcType=DECIMAL},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    update t_lqdata_add
    set id = #{record.id,jdbcType=VARCHAR},
      v_lq_data_id = #{record.vLqDataId,jdbcType=INTEGER},
      i_floor_num = #{record.iFloorNum,jdbcType=INTEGER},
      f_max_f_data = #{record.fMaxFData,jdbcType=DECIMAL},
      f_min_f_data = #{record.fMinFData,jdbcType=DECIMAL},
      f_avg_f_data = #{record.fAvgFData,jdbcType=DECIMAL},
      f_max_around = #{record.fMaxAround,jdbcType=DECIMAL},
      "f_min_ around" = #{record.fMinAround,jdbcType=DECIMAL},
      "f_avg_ around" = #{record.fAvgAround,jdbcType=DECIMAL},
      f_max_center = #{record.fMaxCenter,jdbcType=DECIMAL},
      f_min_center = #{record.fMinCenter,jdbcType=DECIMAL},
      f_avg_center = #{record.fAvgCenter,jdbcType=DECIMAL}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLqdataAdd" >
    update t_lqdata_add
    <set >
      <if test="vLqDataId != null" >
        v_lq_data_id = #{vLqDataId,jdbcType=INTEGER},
      </if>
      <if test="iFloorNum != null" >
        i_floor_num = #{iFloorNum,jdbcType=INTEGER},
      </if>
      <if test="fMaxFData != null" >
        f_max_f_data = #{fMaxFData,jdbcType=DECIMAL},
      </if>
      <if test="fMinFData != null" >
        f_min_f_data = #{fMinFData,jdbcType=DECIMAL},
      </if>
      <if test="fAvgFData != null" >
        f_avg_f_data = #{fAvgFData,jdbcType=DECIMAL},
      </if>
      <if test="fMaxAround != null" >
        f_max_around = #{fMaxAround,jdbcType=DECIMAL},
      </if>
      <if test="fMinAround != null" >
        "f_min_ around" = #{fMinAround,jdbcType=DECIMAL},
      </if>
      <if test="fAvgAround != null" >
        "f_avg_ around" = #{fAvgAround,jdbcType=DECIMAL},
      </if>
      <if test="fMaxCenter != null" >
        f_max_center = #{fMaxCenter,jdbcType=DECIMAL},
      </if>
      <if test="fMinCenter != null" >
        f_min_center = #{fMinCenter,jdbcType=DECIMAL},
      </if>
      <if test="fAvgCenter != null" >
        f_avg_center = #{fAvgCenter,jdbcType=DECIMAL},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLqdataAdd" >
    update t_lqdata_add
    set v_lq_data_id = #{vLqDataId,jdbcType=INTEGER},
      i_floor_num = #{iFloorNum,jdbcType=INTEGER},
      f_max_f_data = #{fMaxFData,jdbcType=DECIMAL},
      f_min_f_data = #{fMinFData,jdbcType=DECIMAL},
      f_avg_f_data = #{fAvgFData,jdbcType=DECIMAL},
      f_max_around = #{fMaxAround,jdbcType=DECIMAL},
      "f_min_ around" = #{fMinAround,jdbcType=DECIMAL},
      "f_avg_ around" = #{fAvgAround,jdbcType=DECIMAL},
      f_max_center = #{fMaxCenter,jdbcType=DECIMAL},
      f_min_center = #{fMinCenter,jdbcType=DECIMAL},
      f_avg_center = #{fAvgCenter,jdbcType=DECIMAL}
    where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>