<?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.chaozhanggui.dao.system.dao.TbPlussDeviceTransferMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussDeviceTransfer">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="userId" jdbcType="INTEGER" property="userid" />
    <result column="acceptUserId" jdbcType="INTEGER" property="acceptuserid" />
    <result column="status" jdbcType="VARCHAR" property="status" />
    <result column="transferTime" jdbcType="TIMESTAMP" property="transfertime" />
    <result column="acceptTime" jdbcType="TIMESTAMP" property="accepttime" />
    <result column="batchNo" jdbcType="VARCHAR" property="batchno" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
  </resultMap>
  <sql id="Base_Column_List">
    id, userId, acceptUserId, status, transferTime, acceptTime, batchNo, remark
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_device_transfer
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_device_transfer
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceTransfer">
    insert into tb_pluss_device_transfer (id, userId, acceptUserId, 
      status, transferTime, acceptTime, 
      batchNo, remark)
    values (#{id,jdbcType=INTEGER}, #{userid,jdbcType=INTEGER}, #{acceptuserid,jdbcType=INTEGER}, 
      #{status,jdbcType=VARCHAR}, #{transfertime,jdbcType=TIMESTAMP}, #{accepttime,jdbcType=TIMESTAMP}, 
      #{batchno,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceTransfer">
    insert into tb_pluss_device_transfer
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="userid != null">
        userId,
      </if>
      <if test="acceptuserid != null">
        acceptUserId,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="transfertime != null">
        transferTime,
      </if>
      <if test="accepttime != null">
        acceptTime,
      </if>
      <if test="batchno != null">
        batchNo,
      </if>
      <if test="remark != null">
        remark,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="userid != null">
        #{userid,jdbcType=INTEGER},
      </if>
      <if test="acceptuserid != null">
        #{acceptuserid,jdbcType=INTEGER},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="transfertime != null">
        #{transfertime,jdbcType=TIMESTAMP},
      </if>
      <if test="accepttime != null">
        #{accepttime,jdbcType=TIMESTAMP},
      </if>
      <if test="batchno != null">
        #{batchno,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceTransfer">
    update tb_pluss_device_transfer
    <set>
      <if test="userid != null">
        userId = #{userid,jdbcType=INTEGER},
      </if>
      <if test="acceptuserid != null">
        acceptUserId = #{acceptuserid,jdbcType=INTEGER},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=VARCHAR},
      </if>
      <if test="transfertime != null">
        transferTime = #{transfertime,jdbcType=TIMESTAMP},
      </if>
      <if test="accepttime != null">
        acceptTime = #{accepttime,jdbcType=TIMESTAMP},
      </if>
      <if test="batchno != null">
        batchNo = #{batchno,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceTransfer">
    update tb_pluss_device_transfer
    set userId = #{userid,jdbcType=INTEGER},
      acceptUserId = #{acceptuserid,jdbcType=INTEGER},
      status = #{status,jdbcType=VARCHAR},
      transferTime = #{transfertime,jdbcType=TIMESTAMP},
      acceptTime = #{accepttime,jdbcType=TIMESTAMP},
      batchNo = #{batchno,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>