<?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="pwc.taxtech.atms.dao.AssetDetailGroupMapper">
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.AssetDetailGroup">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" jdbcType="VARCHAR" property="id" />
    <result column="AssetGroupID" jdbcType="VARCHAR" property="assetgroupid" />
    <result column="DetailGroupName" jdbcType="VARCHAR" property="detailgroupname" />
    <result column="AssetGroupType" jdbcType="INTEGER" property="assetgrouptype" />
    <result column="GroupYear" jdbcType="INTEGER" property="groupyear" />
    <result column="CreateTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="UpdateTime" jdbcType="TIMESTAMP" property="updatetime" />
    <result column="DetailGroupType" jdbcType="INTEGER" property="detailgrouptype" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="pwc.taxtech.atms.entity.AssetDetailGroup">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <result column="KeyValues" jdbcType="LONGVARCHAR" property="keyvalues" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    ID, AssetGroupID, DetailGroupName, AssetGroupType, GroupYear, CreateTime, UpdateTime, 
    DetailGroupType
  </sql>
  <sql id="Blob_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    KeyValues
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="pwc.taxtech.atms.entity.AssetDetailGroupExample" resultMap="ResultMapWithBLOBs">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from AssetDetailGroup
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.AssetDetailGroupExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from AssetDetailGroup
    <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.String" resultMap="ResultMapWithBLOBs">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from AssetDetailGroup
    where ID = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from AssetDetailGroup
    where ID = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.AssetDetailGroupExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from AssetDetailGroup
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.entity.AssetDetailGroup">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into AssetDetailGroup (ID, AssetGroupID, DetailGroupName, 
      AssetGroupType, GroupYear, CreateTime, 
      UpdateTime, DetailGroupType, KeyValues
      )
    values (#{id,jdbcType=VARCHAR}, #{assetgroupid,jdbcType=VARCHAR}, #{detailgroupname,jdbcType=VARCHAR}, 
      #{assetgrouptype,jdbcType=INTEGER}, #{groupyear,jdbcType=INTEGER}, #{createtime,jdbcType=TIMESTAMP}, 
      #{updatetime,jdbcType=TIMESTAMP}, #{detailgrouptype,jdbcType=INTEGER}, #{keyvalues,jdbcType=LONGVARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.AssetDetailGroup">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into AssetDetailGroup
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        ID,
      </if>
      <if test="assetgroupid != null">
        AssetGroupID,
      </if>
      <if test="detailgroupname != null">
        DetailGroupName,
      </if>
      <if test="assetgrouptype != null">
        AssetGroupType,
      </if>
      <if test="groupyear != null">
        GroupYear,
      </if>
      <if test="createtime != null">
        CreateTime,
      </if>
      <if test="updatetime != null">
        UpdateTime,
      </if>
      <if test="detailgrouptype != null">
        DetailGroupType,
      </if>
      <if test="keyvalues != null">
        KeyValues,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="assetgroupid != null">
        #{assetgroupid,jdbcType=VARCHAR},
      </if>
      <if test="detailgroupname != null">
        #{detailgroupname,jdbcType=VARCHAR},
      </if>
      <if test="assetgrouptype != null">
        #{assetgrouptype,jdbcType=INTEGER},
      </if>
      <if test="groupyear != null">
        #{groupyear,jdbcType=INTEGER},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="detailgrouptype != null">
        #{detailgrouptype,jdbcType=INTEGER},
      </if>
      <if test="keyvalues != null">
        #{keyvalues,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.entity.AssetDetailGroupExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from AssetDetailGroup
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update AssetDetailGroup
    <set>
      <if test="record.id != null">
        ID = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.assetgroupid != null">
        AssetGroupID = #{record.assetgroupid,jdbcType=VARCHAR},
      </if>
      <if test="record.detailgroupname != null">
        DetailGroupName = #{record.detailgroupname,jdbcType=VARCHAR},
      </if>
      <if test="record.assetgrouptype != null">
        AssetGroupType = #{record.assetgrouptype,jdbcType=INTEGER},
      </if>
      <if test="record.groupyear != null">
        GroupYear = #{record.groupyear,jdbcType=INTEGER},
      </if>
      <if test="record.createtime != null">
        CreateTime = #{record.createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updatetime != null">
        UpdateTime = #{record.updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.detailgrouptype != null">
        DetailGroupType = #{record.detailgrouptype,jdbcType=INTEGER},
      </if>
      <if test="record.keyvalues != null">
        KeyValues = #{record.keyvalues,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update AssetDetailGroup
    set ID = #{record.id,jdbcType=VARCHAR},
      AssetGroupID = #{record.assetgroupid,jdbcType=VARCHAR},
      DetailGroupName = #{record.detailgroupname,jdbcType=VARCHAR},
      AssetGroupType = #{record.assetgrouptype,jdbcType=INTEGER},
      GroupYear = #{record.groupyear,jdbcType=INTEGER},
      CreateTime = #{record.createtime,jdbcType=TIMESTAMP},
      UpdateTime = #{record.updatetime,jdbcType=TIMESTAMP},
      DetailGroupType = #{record.detailgrouptype,jdbcType=INTEGER},
      KeyValues = #{record.keyvalues,jdbcType=LONGVARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update AssetDetailGroup
    set ID = #{record.id,jdbcType=VARCHAR},
      AssetGroupID = #{record.assetgroupid,jdbcType=VARCHAR},
      DetailGroupName = #{record.detailgroupname,jdbcType=VARCHAR},
      AssetGroupType = #{record.assetgrouptype,jdbcType=INTEGER},
      GroupYear = #{record.groupyear,jdbcType=INTEGER},
      CreateTime = #{record.createtime,jdbcType=TIMESTAMP},
      UpdateTime = #{record.updatetime,jdbcType=TIMESTAMP},
      DetailGroupType = #{record.detailgrouptype,jdbcType=INTEGER}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entity.AssetDetailGroup">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update AssetDetailGroup
    <set>
      <if test="assetgroupid != null">
        AssetGroupID = #{assetgroupid,jdbcType=VARCHAR},
      </if>
      <if test="detailgroupname != null">
        DetailGroupName = #{detailgroupname,jdbcType=VARCHAR},
      </if>
      <if test="assetgrouptype != null">
        AssetGroupType = #{assetgrouptype,jdbcType=INTEGER},
      </if>
      <if test="groupyear != null">
        GroupYear = #{groupyear,jdbcType=INTEGER},
      </if>
      <if test="createtime != null">
        CreateTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        UpdateTime = #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="detailgrouptype != null">
        DetailGroupType = #{detailgrouptype,jdbcType=INTEGER},
      </if>
      <if test="keyvalues != null">
        KeyValues = #{keyvalues,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where ID = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="pwc.taxtech.atms.entity.AssetDetailGroup">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update AssetDetailGroup
    set AssetGroupID = #{assetgroupid,jdbcType=VARCHAR},
      DetailGroupName = #{detailgroupname,jdbcType=VARCHAR},
      AssetGroupType = #{assetgrouptype,jdbcType=INTEGER},
      GroupYear = #{groupyear,jdbcType=INTEGER},
      CreateTime = #{createtime,jdbcType=TIMESTAMP},
      UpdateTime = #{updatetime,jdbcType=TIMESTAMP},
      DetailGroupType = #{detailgrouptype,jdbcType=INTEGER},
      KeyValues = #{keyvalues,jdbcType=LONGVARCHAR}
    where ID = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entity.AssetDetailGroup">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update AssetDetailGroup
    set AssetGroupID = #{assetgroupid,jdbcType=VARCHAR},
      DetailGroupName = #{detailgroupname,jdbcType=VARCHAR},
      AssetGroupType = #{assetgrouptype,jdbcType=INTEGER},
      GroupYear = #{groupyear,jdbcType=INTEGER},
      CreateTime = #{createtime,jdbcType=TIMESTAMP},
      UpdateTime = #{updatetime,jdbcType=TIMESTAMP},
      DetailGroupType = #{detailgrouptype,jdbcType=INTEGER}
    where ID = #{id,jdbcType=VARCHAR}
  </update>
  <select id="selectByExampleWithBLOBsWithRowbounds" parameterType="pwc.taxtech.atms.entity.AssetDetailGroupExample" resultMap="ResultMapWithBLOBs">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from AssetDetailGroup
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.AssetDetailGroupExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from AssetDetailGroup
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
</mapper>