<?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.jsh.erp.datasource.mappers.AssetMapper">
  <resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Asset">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="assetnameID" jdbcType="BIGINT" property="assetnameid" />
    <result column="location" jdbcType="VARCHAR" property="location" />
    <result column="labels" jdbcType="VARCHAR" property="labels" />
    <result column="status" jdbcType="SMALLINT" property="status" />
    <result column="userID" jdbcType="BIGINT" property="userid" />
    <result column="price" jdbcType="DECIMAL" property="price" />
    <result column="purchasedate" jdbcType="TIMESTAMP" property="purchasedate" />
    <result column="periodofvalidity" jdbcType="TIMESTAMP" property="periodofvalidity" />
    <result column="warrantydate" jdbcType="TIMESTAMP" property="warrantydate" />
    <result column="assetnum" jdbcType="VARCHAR" property="assetnum" />
    <result column="serialnum" jdbcType="VARCHAR" property="serialnum" />
    <result column="supplier" jdbcType="BIGINT" property="supplier" />
    <result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="creator" jdbcType="BIGINT" property="creator" />
    <result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
    <result column="updator" jdbcType="BIGINT" property="updator" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.jsh.erp.datasource.entities.Asset">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <result column="description" jdbcType="LONGVARCHAR" property="description" />
    <result column="addMonth" jdbcType="LONGVARCHAR" property="addmonth" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbggenerated
      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 - @mbggenerated
      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 - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    id, assetnameID, location, labels, status, userID, price, purchasedate, periodofvalidity, 
    warrantydate, assetnum, serialnum, supplier, createtime, creator, updatetime, updator
  </sql>
  <sql id="Blob_Column_List">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    description, addMonth
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="com.jsh.erp.datasource.entities.AssetExample" resultMap="ResultMapWithBLOBs">
    <!--
      WARNING - @mbggenerated
      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 jsh_asset
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AssetExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from jsh_asset
    <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.Long" resultMap="ResultMapWithBLOBs">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from jsh_asset
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from jsh_asset
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AssetExample">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from jsh_asset
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.jsh.erp.datasource.entities.Asset">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into jsh_asset (id, assetnameID, location, 
      labels, status, userID, 
      price, purchasedate, periodofvalidity, 
      warrantydate, assetnum, serialnum, 
      supplier, createtime, creator, 
      updatetime, updator, description, 
      addMonth)
    values (#{id,jdbcType=BIGINT}, #{assetnameid,jdbcType=BIGINT}, #{location,jdbcType=VARCHAR}, 
      #{labels,jdbcType=VARCHAR}, #{status,jdbcType=SMALLINT}, #{userid,jdbcType=BIGINT}, 
      #{price,jdbcType=DECIMAL}, #{purchasedate,jdbcType=TIMESTAMP}, #{periodofvalidity,jdbcType=TIMESTAMP}, 
      #{warrantydate,jdbcType=TIMESTAMP}, #{assetnum,jdbcType=VARCHAR}, #{serialnum,jdbcType=VARCHAR}, 
      #{supplier,jdbcType=BIGINT}, #{createtime,jdbcType=TIMESTAMP}, #{creator,jdbcType=BIGINT}, 
      #{updatetime,jdbcType=TIMESTAMP}, #{updator,jdbcType=BIGINT}, #{description,jdbcType=LONGVARCHAR}, 
      #{addmonth,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Asset">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into jsh_asset
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="assetnameid != null">
        assetnameID,
      </if>
      <if test="location != null">
        location,
      </if>
      <if test="labels != null">
        labels,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="userid != null">
        userID,
      </if>
      <if test="price != null">
        price,
      </if>
      <if test="purchasedate != null">
        purchasedate,
      </if>
      <if test="periodofvalidity != null">
        periodofvalidity,
      </if>
      <if test="warrantydate != null">
        warrantydate,
      </if>
      <if test="assetnum != null">
        assetnum,
      </if>
      <if test="serialnum != null">
        serialnum,
      </if>
      <if test="supplier != null">
        supplier,
      </if>
      <if test="createtime != null">
        createtime,
      </if>
      <if test="creator != null">
        creator,
      </if>
      <if test="updatetime != null">
        updatetime,
      </if>
      <if test="updator != null">
        updator,
      </if>
      <if test="description != null">
        description,
      </if>
      <if test="addmonth != null">
        addMonth,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="assetnameid != null">
        #{assetnameid,jdbcType=BIGINT},
      </if>
      <if test="location != null">
        #{location,jdbcType=VARCHAR},
      </if>
      <if test="labels != null">
        #{labels,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=SMALLINT},
      </if>
      <if test="userid != null">
        #{userid,jdbcType=BIGINT},
      </if>
      <if test="price != null">
        #{price,jdbcType=DECIMAL},
      </if>
      <if test="purchasedate != null">
        #{purchasedate,jdbcType=TIMESTAMP},
      </if>
      <if test="periodofvalidity != null">
        #{periodofvalidity,jdbcType=TIMESTAMP},
      </if>
      <if test="warrantydate != null">
        #{warrantydate,jdbcType=TIMESTAMP},
      </if>
      <if test="assetnum != null">
        #{assetnum,jdbcType=VARCHAR},
      </if>
      <if test="serialnum != null">
        #{serialnum,jdbcType=VARCHAR},
      </if>
      <if test="supplier != null">
        #{supplier,jdbcType=BIGINT},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="creator != null">
        #{creator,jdbcType=BIGINT},
      </if>
      <if test="updatetime != null">
        #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="updator != null">
        #{updator,jdbcType=BIGINT},
      </if>
      <if test="description != null">
        #{description,jdbcType=LONGVARCHAR},
      </if>
      <if test="addmonth != null">
        #{addmonth,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AssetExample" resultType="java.lang.Integer">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from jsh_asset
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update jsh_asset
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.assetnameid != null">
        assetnameID = #{record.assetnameid,jdbcType=BIGINT},
      </if>
      <if test="record.location != null">
        location = #{record.location,jdbcType=VARCHAR},
      </if>
      <if test="record.labels != null">
        labels = #{record.labels,jdbcType=VARCHAR},
      </if>
      <if test="record.status != null">
        status = #{record.status,jdbcType=SMALLINT},
      </if>
      <if test="record.userid != null">
        userID = #{record.userid,jdbcType=BIGINT},
      </if>
      <if test="record.price != null">
        price = #{record.price,jdbcType=DECIMAL},
      </if>
      <if test="record.purchasedate != null">
        purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.periodofvalidity != null">
        periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
      </if>
      <if test="record.warrantydate != null">
        warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.assetnum != null">
        assetnum = #{record.assetnum,jdbcType=VARCHAR},
      </if>
      <if test="record.serialnum != null">
        serialnum = #{record.serialnum,jdbcType=VARCHAR},
      </if>
      <if test="record.supplier != null">
        supplier = #{record.supplier,jdbcType=BIGINT},
      </if>
      <if test="record.createtime != null">
        createtime = #{record.createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.creator != null">
        creator = #{record.creator,jdbcType=BIGINT},
      </if>
      <if test="record.updatetime != null">
        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updator != null">
        updator = #{record.updator,jdbcType=BIGINT},
      </if>
      <if test="record.description != null">
        description = #{record.description,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.addmonth != null">
        addMonth = #{record.addmonth,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update jsh_asset
    set id = #{record.id,jdbcType=BIGINT},
      assetnameID = #{record.assetnameid,jdbcType=BIGINT},
      location = #{record.location,jdbcType=VARCHAR},
      labels = #{record.labels,jdbcType=VARCHAR},
      status = #{record.status,jdbcType=SMALLINT},
      userID = #{record.userid,jdbcType=BIGINT},
      price = #{record.price,jdbcType=DECIMAL},
      purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
      periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
      warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
      assetnum = #{record.assetnum,jdbcType=VARCHAR},
      serialnum = #{record.serialnum,jdbcType=VARCHAR},
      supplier = #{record.supplier,jdbcType=BIGINT},
      createtime = #{record.createtime,jdbcType=TIMESTAMP},
      creator = #{record.creator,jdbcType=BIGINT},
      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
      updator = #{record.updator,jdbcType=BIGINT},
      description = #{record.description,jdbcType=LONGVARCHAR},
      addMonth = #{record.addmonth,jdbcType=LONGVARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update jsh_asset
    set id = #{record.id,jdbcType=BIGINT},
      assetnameID = #{record.assetnameid,jdbcType=BIGINT},
      location = #{record.location,jdbcType=VARCHAR},
      labels = #{record.labels,jdbcType=VARCHAR},
      status = #{record.status,jdbcType=SMALLINT},
      userID = #{record.userid,jdbcType=BIGINT},
      price = #{record.price,jdbcType=DECIMAL},
      purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
      periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
      warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
      assetnum = #{record.assetnum,jdbcType=VARCHAR},
      serialnum = #{record.serialnum,jdbcType=VARCHAR},
      supplier = #{record.supplier,jdbcType=BIGINT},
      createtime = #{record.createtime,jdbcType=TIMESTAMP},
      creator = #{record.creator,jdbcType=BIGINT},
      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
      updator = #{record.updator,jdbcType=BIGINT}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Asset">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update jsh_asset
    <set>
      <if test="assetnameid != null">
        assetnameID = #{assetnameid,jdbcType=BIGINT},
      </if>
      <if test="location != null">
        location = #{location,jdbcType=VARCHAR},
      </if>
      <if test="labels != null">
        labels = #{labels,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=SMALLINT},
      </if>
      <if test="userid != null">
        userID = #{userid,jdbcType=BIGINT},
      </if>
      <if test="price != null">
        price = #{price,jdbcType=DECIMAL},
      </if>
      <if test="purchasedate != null">
        purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
      </if>
      <if test="periodofvalidity != null">
        periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
      </if>
      <if test="warrantydate != null">
        warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
      </if>
      <if test="assetnum != null">
        assetnum = #{assetnum,jdbcType=VARCHAR},
      </if>
      <if test="serialnum != null">
        serialnum = #{serialnum,jdbcType=VARCHAR},
      </if>
      <if test="supplier != null">
        supplier = #{supplier,jdbcType=BIGINT},
      </if>
      <if test="createtime != null">
        createtime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="creator != null">
        creator = #{creator,jdbcType=BIGINT},
      </if>
      <if test="updatetime != null">
        updatetime = #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="updator != null">
        updator = #{updator,jdbcType=BIGINT},
      </if>
      <if test="description != null">
        description = #{description,jdbcType=LONGVARCHAR},
      </if>
      <if test="addmonth != null">
        addMonth = #{addmonth,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.jsh.erp.datasource.entities.Asset">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update jsh_asset
    set assetnameID = #{assetnameid,jdbcType=BIGINT},
      location = #{location,jdbcType=VARCHAR},
      labels = #{labels,jdbcType=VARCHAR},
      status = #{status,jdbcType=SMALLINT},
      userID = #{userid,jdbcType=BIGINT},
      price = #{price,jdbcType=DECIMAL},
      purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
      periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
      warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
      assetnum = #{assetnum,jdbcType=VARCHAR},
      serialnum = #{serialnum,jdbcType=VARCHAR},
      supplier = #{supplier,jdbcType=BIGINT},
      createtime = #{createtime,jdbcType=TIMESTAMP},
      creator = #{creator,jdbcType=BIGINT},
      updatetime = #{updatetime,jdbcType=TIMESTAMP},
      updator = #{updator,jdbcType=BIGINT},
      description = #{description,jdbcType=LONGVARCHAR},
      addMonth = #{addmonth,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Asset">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update jsh_asset
    set assetnameID = #{assetnameid,jdbcType=BIGINT},
      location = #{location,jdbcType=VARCHAR},
      labels = #{labels,jdbcType=VARCHAR},
      status = #{status,jdbcType=SMALLINT},
      userID = #{userid,jdbcType=BIGINT},
      price = #{price,jdbcType=DECIMAL},
      purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
      periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
      warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
      assetnum = #{assetnum,jdbcType=VARCHAR},
      serialnum = #{serialnum,jdbcType=VARCHAR},
      supplier = #{supplier,jdbcType=BIGINT},
      createtime = #{createtime,jdbcType=TIMESTAMP},
      creator = #{creator,jdbcType=BIGINT},
      updatetime = #{updatetime,jdbcType=TIMESTAMP},
      updator = #{updator,jdbcType=BIGINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>