<?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.jqtx.windows.repository.mapper.WindowsBackedDetailMapper">
  <resultMap id="BaseResultMap" type="com.jqtx.windows.repository.entity.WindowsBackedDetail">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="backed_no" jdbcType="VARCHAR" property="backedNo" />
    <result column="plan_no" jdbcType="VARCHAR" property="planNo" />
    <result column="backed_date" jdbcType="DATE" property="backedDate" />
    <result column="backed_amt" jdbcType="DECIMAL" property="backedAmt" />
    <result column="backed_ben" jdbcType="DECIMAL" property="backedBen" />
    <result column="backed_xi" jdbcType="DECIMAL" property="backedXi" />
    <result column="backed_fu" jdbcType="DECIMAL" property="backedFu" />
    <result column="backed_fa" jdbcType="DECIMAL" property="backedFa" />
    <result column="backed_burden" jdbcType="DECIMAL" property="backedBurden" />
    <result column="backed_speaccount" jdbcType="DECIMAL" property="backedSpeaccount" />
    <result column="backed_break" jdbcType="DECIMAL" property="backedBreak" />
    <result column="backed_type" jdbcType="VARCHAR" property="backedType" />
    <result column="gmt_created" jdbcType="TIMESTAMP" property="gmtCreated" />
    <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
    <result column="memo" jdbcType="VARCHAR" property="memo" />
  </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">
    id, backed_no, plan_no, backed_date, backed_amt, backed_ben, backed_xi, backed_fu, 
    backed_fa, backed_burden, backed_speaccount, backed_break, backed_type, gmt_created, 
    gmt_modified, memo
  </sql>
  <select id="selectByExample" parameterType="com.jqtx.windows.repository.entity.WindowsBackedDetailExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from windows_backed_detail
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from windows_backed_detail
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from windows_backed_detail
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.jqtx.windows.repository.entity.WindowsBackedDetailExample">
    delete from windows_backed_detail
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.jqtx.windows.repository.entity.WindowsBackedDetail">
    insert into windows_backed_detail (id, backed_no, plan_no, 
      backed_date, backed_amt, backed_ben, 
      backed_xi, backed_fu, backed_fa, 
      backed_burden, backed_speaccount, backed_break, 
      backed_type, gmt_created, gmt_modified, 
      memo)
    values (#{id,jdbcType=INTEGER}, #{backedNo,jdbcType=VARCHAR}, #{planNo,jdbcType=VARCHAR}, 
      #{backedDate,jdbcType=DATE}, #{backedAmt,jdbcType=DECIMAL}, #{backedBen,jdbcType=DECIMAL}, 
      #{backedXi,jdbcType=DECIMAL}, #{backedFu,jdbcType=DECIMAL}, #{backedFa,jdbcType=DECIMAL}, 
      #{backedBurden,jdbcType=DECIMAL}, #{backedSpeaccount,jdbcType=DECIMAL}, #{backedBreak,jdbcType=DECIMAL}, 
      #{backedType,jdbcType=VARCHAR}, #{gmtCreated,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}, 
      #{memo,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.jqtx.windows.repository.entity.WindowsBackedDetail">
    insert into windows_backed_detail
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="backedNo != null">
        backed_no,
      </if>
      <if test="planNo != null">
        plan_no,
      </if>
      <if test="backedDate != null">
        backed_date,
      </if>
      <if test="backedAmt != null">
        backed_amt,
      </if>
      <if test="backedBen != null">
        backed_ben,
      </if>
      <if test="backedXi != null">
        backed_xi,
      </if>
      <if test="backedFu != null">
        backed_fu,
      </if>
      <if test="backedFa != null">
        backed_fa,
      </if>
      <if test="backedBurden != null">
        backed_burden,
      </if>
      <if test="backedSpeaccount != null">
        backed_speaccount,
      </if>
      <if test="backedBreak != null">
        backed_break,
      </if>
      <if test="backedType != null">
        backed_type,
      </if>
      <if test="gmtCreated != null">
        gmt_created,
      </if>
      <if test="gmtModified != null">
        gmt_modified,
      </if>
      <if test="memo != null">
        memo,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="backedNo != null">
        #{backedNo,jdbcType=VARCHAR},
      </if>
      <if test="planNo != null">
        #{planNo,jdbcType=VARCHAR},
      </if>
      <if test="backedDate != null">
        #{backedDate,jdbcType=DATE},
      </if>
      <if test="backedAmt != null">
        #{backedAmt,jdbcType=DECIMAL},
      </if>
      <if test="backedBen != null">
        #{backedBen,jdbcType=DECIMAL},
      </if>
      <if test="backedXi != null">
        #{backedXi,jdbcType=DECIMAL},
      </if>
      <if test="backedFu != null">
        #{backedFu,jdbcType=DECIMAL},
      </if>
      <if test="backedFa != null">
        #{backedFa,jdbcType=DECIMAL},
      </if>
      <if test="backedBurden != null">
        #{backedBurden,jdbcType=DECIMAL},
      </if>
      <if test="backedSpeaccount != null">
        #{backedSpeaccount,jdbcType=DECIMAL},
      </if>
      <if test="backedBreak != null">
        #{backedBreak,jdbcType=DECIMAL},
      </if>
      <if test="backedType != null">
        #{backedType,jdbcType=VARCHAR},
      </if>
      <if test="gmtCreated != null">
        #{gmtCreated,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        #{gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="memo != null">
        #{memo,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.jqtx.windows.repository.entity.WindowsBackedDetailExample" resultType="java.lang.Long">
    select count(*) from windows_backed_detail
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update windows_backed_detail
    <set>
      <if test="row.id != null">
        id = #{row.id,jdbcType=INTEGER},
      </if>
      <if test="row.backedNo != null">
        backed_no = #{row.backedNo,jdbcType=VARCHAR},
      </if>
      <if test="row.planNo != null">
        plan_no = #{row.planNo,jdbcType=VARCHAR},
      </if>
      <if test="row.backedDate != null">
        backed_date = #{row.backedDate,jdbcType=DATE},
      </if>
      <if test="row.backedAmt != null">
        backed_amt = #{row.backedAmt,jdbcType=DECIMAL},
      </if>
      <if test="row.backedBen != null">
        backed_ben = #{row.backedBen,jdbcType=DECIMAL},
      </if>
      <if test="row.backedXi != null">
        backed_xi = #{row.backedXi,jdbcType=DECIMAL},
      </if>
      <if test="row.backedFu != null">
        backed_fu = #{row.backedFu,jdbcType=DECIMAL},
      </if>
      <if test="row.backedFa != null">
        backed_fa = #{row.backedFa,jdbcType=DECIMAL},
      </if>
      <if test="row.backedBurden != null">
        backed_burden = #{row.backedBurden,jdbcType=DECIMAL},
      </if>
      <if test="row.backedSpeaccount != null">
        backed_speaccount = #{row.backedSpeaccount,jdbcType=DECIMAL},
      </if>
      <if test="row.backedBreak != null">
        backed_break = #{row.backedBreak,jdbcType=DECIMAL},
      </if>
      <if test="row.backedType != null">
        backed_type = #{row.backedType,jdbcType=VARCHAR},
      </if>
      <if test="row.gmtCreated != null">
        gmt_created = #{row.gmtCreated,jdbcType=TIMESTAMP},
      </if>
      <if test="row.gmtModified != null">
        gmt_modified = #{row.gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="row.memo != null">
        memo = #{row.memo,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="example != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update windows_backed_detail
    set id = #{row.id,jdbcType=INTEGER},
      backed_no = #{row.backedNo,jdbcType=VARCHAR},
      plan_no = #{row.planNo,jdbcType=VARCHAR},
      backed_date = #{row.backedDate,jdbcType=DATE},
      backed_amt = #{row.backedAmt,jdbcType=DECIMAL},
      backed_ben = #{row.backedBen,jdbcType=DECIMAL},
      backed_xi = #{row.backedXi,jdbcType=DECIMAL},
      backed_fu = #{row.backedFu,jdbcType=DECIMAL},
      backed_fa = #{row.backedFa,jdbcType=DECIMAL},
      backed_burden = #{row.backedBurden,jdbcType=DECIMAL},
      backed_speaccount = #{row.backedSpeaccount,jdbcType=DECIMAL},
      backed_break = #{row.backedBreak,jdbcType=DECIMAL},
      backed_type = #{row.backedType,jdbcType=VARCHAR},
      gmt_created = #{row.gmtCreated,jdbcType=TIMESTAMP},
      gmt_modified = #{row.gmtModified,jdbcType=TIMESTAMP},
      memo = #{row.memo,jdbcType=VARCHAR}
    <if test="example != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.jqtx.windows.repository.entity.WindowsBackedDetail">
    update windows_backed_detail
    <set>
      <if test="backedNo != null">
        backed_no = #{backedNo,jdbcType=VARCHAR},
      </if>
      <if test="planNo != null">
        plan_no = #{planNo,jdbcType=VARCHAR},
      </if>
      <if test="backedDate != null">
        backed_date = #{backedDate,jdbcType=DATE},
      </if>
      <if test="backedAmt != null">
        backed_amt = #{backedAmt,jdbcType=DECIMAL},
      </if>
      <if test="backedBen != null">
        backed_ben = #{backedBen,jdbcType=DECIMAL},
      </if>
      <if test="backedXi != null">
        backed_xi = #{backedXi,jdbcType=DECIMAL},
      </if>
      <if test="backedFu != null">
        backed_fu = #{backedFu,jdbcType=DECIMAL},
      </if>
      <if test="backedFa != null">
        backed_fa = #{backedFa,jdbcType=DECIMAL},
      </if>
      <if test="backedBurden != null">
        backed_burden = #{backedBurden,jdbcType=DECIMAL},
      </if>
      <if test="backedSpeaccount != null">
        backed_speaccount = #{backedSpeaccount,jdbcType=DECIMAL},
      </if>
      <if test="backedBreak != null">
        backed_break = #{backedBreak,jdbcType=DECIMAL},
      </if>
      <if test="backedType != null">
        backed_type = #{backedType,jdbcType=VARCHAR},
      </if>
      <if test="gmtCreated != null">
        gmt_created = #{gmtCreated,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="memo != null">
        memo = #{memo,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.jqtx.windows.repository.entity.WindowsBackedDetail">
    update windows_backed_detail
    set backed_no = #{backedNo,jdbcType=VARCHAR},
      plan_no = #{planNo,jdbcType=VARCHAR},
      backed_date = #{backedDate,jdbcType=DATE},
      backed_amt = #{backedAmt,jdbcType=DECIMAL},
      backed_ben = #{backedBen,jdbcType=DECIMAL},
      backed_xi = #{backedXi,jdbcType=DECIMAL},
      backed_fu = #{backedFu,jdbcType=DECIMAL},
      backed_fa = #{backedFa,jdbcType=DECIMAL},
      backed_burden = #{backedBurden,jdbcType=DECIMAL},
      backed_speaccount = #{backedSpeaccount,jdbcType=DECIMAL},
      backed_break = #{backedBreak,jdbcType=DECIMAL},
      backed_type = #{backedType,jdbcType=VARCHAR},
      gmt_created = #{gmtCreated,jdbcType=TIMESTAMP},
      gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
      memo = #{memo,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>