<?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.TbPlussJftReceiptInfoMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussJftReceiptInfo">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="projectName" jdbcType="VARCHAR" property="projectname" />
    <result column="amount" jdbcType="DECIMAL" property="amount" />
    <result column="userId" jdbcType="INTEGER" property="userid" />
    <result column="status" jdbcType="INTEGER" property="status" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="endTime" jdbcType="TIMESTAMP" property="endtime" />
    <result column="token" jdbcType="VARCHAR" property="token" />
    <result column="qrCodeUrl" jdbcType="VARCHAR" property="qrcodeurl" />
    <result column="imageUrl" jdbcType="VARCHAR" property="imageurl" />
    <result column="ip" jdbcType="VARCHAR" property="ip" />
  </resultMap>
  <sql id="Base_Column_List">
    id, projectName, amount, userId, status, createTime, endTime, token, qrCodeUrl, imageUrl, 
    ip
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_jft_receipt_info
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_jft_receipt_info
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussJftReceiptInfo">
    insert into tb_pluss_jft_receipt_info (id, projectName, amount, 
      userId, status, createTime, 
      endTime, token, qrCodeUrl, 
      imageUrl, ip)
    values (#{id,jdbcType=INTEGER}, #{projectname,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, 
      #{userid,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createtime,jdbcType=TIMESTAMP}, 
      #{endtime,jdbcType=TIMESTAMP}, #{token,jdbcType=VARCHAR}, #{qrcodeurl,jdbcType=VARCHAR}, 
      #{imageurl,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussJftReceiptInfo">
    insert into tb_pluss_jft_receipt_info
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="projectname != null">
        projectName,
      </if>
      <if test="amount != null">
        amount,
      </if>
      <if test="userid != null">
        userId,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="endtime != null">
        endTime,
      </if>
      <if test="token != null">
        token,
      </if>
      <if test="qrcodeurl != null">
        qrCodeUrl,
      </if>
      <if test="imageurl != null">
        imageUrl,
      </if>
      <if test="ip != null">
        ip,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="projectname != null">
        #{projectname,jdbcType=VARCHAR},
      </if>
      <if test="amount != null">
        #{amount,jdbcType=DECIMAL},
      </if>
      <if test="userid != null">
        #{userid,jdbcType=INTEGER},
      </if>
      <if test="status != null">
        #{status,jdbcType=INTEGER},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="endtime != null">
        #{endtime,jdbcType=TIMESTAMP},
      </if>
      <if test="token != null">
        #{token,jdbcType=VARCHAR},
      </if>
      <if test="qrcodeurl != null">
        #{qrcodeurl,jdbcType=VARCHAR},
      </if>
      <if test="imageurl != null">
        #{imageurl,jdbcType=VARCHAR},
      </if>
      <if test="ip != null">
        #{ip,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussJftReceiptInfo">
    update tb_pluss_jft_receipt_info
    <set>
      <if test="projectname != null">
        projectName = #{projectname,jdbcType=VARCHAR},
      </if>
      <if test="amount != null">
        amount = #{amount,jdbcType=DECIMAL},
      </if>
      <if test="userid != null">
        userId = #{userid,jdbcType=INTEGER},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=INTEGER},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="endtime != null">
        endTime = #{endtime,jdbcType=TIMESTAMP},
      </if>
      <if test="token != null">
        token = #{token,jdbcType=VARCHAR},
      </if>
      <if test="qrcodeurl != null">
        qrCodeUrl = #{qrcodeurl,jdbcType=VARCHAR},
      </if>
      <if test="imageurl != null">
        imageUrl = #{imageurl,jdbcType=VARCHAR},
      </if>
      <if test="ip != null">
        ip = #{ip,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussJftReceiptInfo">
    update tb_pluss_jft_receipt_info
    set projectName = #{projectname,jdbcType=VARCHAR},
      amount = #{amount,jdbcType=DECIMAL},
      userId = #{userid,jdbcType=INTEGER},
      status = #{status,jdbcType=INTEGER},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      endTime = #{endtime,jdbcType=TIMESTAMP},
      token = #{token,jdbcType=VARCHAR},
      qrCodeUrl = #{qrcodeurl,jdbcType=VARCHAR},
      imageUrl = #{imageurl,jdbcType=VARCHAR},
      ip = #{ip,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>