<?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.TbPlussMercOrderDetailMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMercOrderDetail">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="shopTrolleyId" jdbcType="INTEGER" property="shoptrolleyid" />
    <result column="orderNo" jdbcType="VARCHAR" property="orderno" />
    <result column="code" jdbcType="VARCHAR" property="code" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="desc" jdbcType="VARCHAR" property="desc" />
    <result column="price" jdbcType="DECIMAL" property="price" />
    <result column="deviceLogo" jdbcType="VARCHAR" property="devicelogo" />
    <result column="type" jdbcType="VARCHAR" property="type" />
    <result column="num" jdbcType="INTEGER" property="num" />
    <result column="userId" jdbcType="INTEGER" property="userid" />
    <result column="logistNo" jdbcType="VARCHAR" property="logistno" />
    <result column="status" jdbcType="VARCHAR" property="status" />
    <result column="refundReason" jdbcType="VARCHAR" property="refundreason" />
    <result column="rejectRemark" jdbcType="VARCHAR" property="rejectremark" />
    <result column="refundType" jdbcType="VARCHAR" property="refundtype" />
    <result column="expressNo" jdbcType="VARCHAR" property="expressno" />
    <result column="refundExpressNo" jdbcType="VARCHAR" property="refundexpressno" />
    <result column="refundAmt" jdbcType="DECIMAL" property="refundamt" />
    <result column="refundNo" jdbcType="VARCHAR" property="refundno" />
    <result column="refundTime" jdbcType="TIMESTAMP" property="refundtime" />
    <result column="refundRemark" jdbcType="VARCHAR" property="refundremark" />
    <result column="postage" jdbcType="DECIMAL" property="postage" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
  </resultMap>
  <sql id="Base_Column_List">
    id, shopTrolleyId, orderNo, code, name, desc, price, deviceLogo, type, num, userId, 
    logistNo, status, refundReason, rejectRemark, refundType, expressNo, refundExpressNo, 
    refundAmt, refundNo, refundTime, refundRemark, postage, createTime
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_merc_order_detail
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merc_order_detail
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMercOrderDetail">
    insert into tb_pluss_merc_order_detail (id, shopTrolleyId, orderNo, 
      code, name, desc, price, 
      deviceLogo, type, num, 
      userId, logistNo, status, 
      refundReason, rejectRemark, refundType, 
      expressNo, refundExpressNo, refundAmt, 
      refundNo, refundTime, refundRemark, 
      postage, createTime)
    values (#{id,jdbcType=INTEGER}, #{shoptrolleyid,jdbcType=INTEGER}, #{orderno,jdbcType=VARCHAR}, 
      #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, 
      #{devicelogo,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, 
      #{userid,jdbcType=INTEGER}, #{logistno,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, 
      #{refundreason,jdbcType=VARCHAR}, #{rejectremark,jdbcType=VARCHAR}, #{refundtype,jdbcType=VARCHAR}, 
      #{expressno,jdbcType=VARCHAR}, #{refundexpressno,jdbcType=VARCHAR}, #{refundamt,jdbcType=DECIMAL}, 
      #{refundno,jdbcType=VARCHAR}, #{refundtime,jdbcType=TIMESTAMP}, #{refundremark,jdbcType=VARCHAR}, 
      #{postage,jdbcType=DECIMAL}, #{createtime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMercOrderDetail">
    insert into tb_pluss_merc_order_detail
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="shoptrolleyid != null">
        shopTrolleyId,
      </if>
      <if test="orderno != null">
        orderNo,
      </if>
      <if test="code != null">
        code,
      </if>
      <if test="name != null">
        name,
      </if>
      <if test="desc != null">
        desc,
      </if>
      <if test="price != null">
        price,
      </if>
      <if test="devicelogo != null">
        deviceLogo,
      </if>
      <if test="type != null">
        type,
      </if>
      <if test="num != null">
        num,
      </if>
      <if test="userid != null">
        userId,
      </if>
      <if test="logistno != null">
        logistNo,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="refundreason != null">
        refundReason,
      </if>
      <if test="rejectremark != null">
        rejectRemark,
      </if>
      <if test="refundtype != null">
        refundType,
      </if>
      <if test="expressno != null">
        expressNo,
      </if>
      <if test="refundexpressno != null">
        refundExpressNo,
      </if>
      <if test="refundamt != null">
        refundAmt,
      </if>
      <if test="refundno != null">
        refundNo,
      </if>
      <if test="refundtime != null">
        refundTime,
      </if>
      <if test="refundremark != null">
        refundRemark,
      </if>
      <if test="postage != null">
        postage,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="shoptrolleyid != null">
        #{shoptrolleyid,jdbcType=INTEGER},
      </if>
      <if test="orderno != null">
        #{orderno,jdbcType=VARCHAR},
      </if>
      <if test="code != null">
        #{code,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="desc != null">
        #{desc,jdbcType=VARCHAR},
      </if>
      <if test="price != null">
        #{price,jdbcType=DECIMAL},
      </if>
      <if test="devicelogo != null">
        #{devicelogo,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        #{type,jdbcType=VARCHAR},
      </if>
      <if test="num != null">
        #{num,jdbcType=INTEGER},
      </if>
      <if test="userid != null">
        #{userid,jdbcType=INTEGER},
      </if>
      <if test="logistno != null">
        #{logistno,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="refundreason != null">
        #{refundreason,jdbcType=VARCHAR},
      </if>
      <if test="rejectremark != null">
        #{rejectremark,jdbcType=VARCHAR},
      </if>
      <if test="refundtype != null">
        #{refundtype,jdbcType=VARCHAR},
      </if>
      <if test="expressno != null">
        #{expressno,jdbcType=VARCHAR},
      </if>
      <if test="refundexpressno != null">
        #{refundexpressno,jdbcType=VARCHAR},
      </if>
      <if test="refundamt != null">
        #{refundamt,jdbcType=DECIMAL},
      </if>
      <if test="refundno != null">
        #{refundno,jdbcType=VARCHAR},
      </if>
      <if test="refundtime != null">
        #{refundtime,jdbcType=TIMESTAMP},
      </if>
      <if test="refundremark != null">
        #{refundremark,jdbcType=VARCHAR},
      </if>
      <if test="postage != null">
        #{postage,jdbcType=DECIMAL},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMercOrderDetail">
    update tb_pluss_merc_order_detail
    <set>
      <if test="shoptrolleyid != null">
        shopTrolleyId = #{shoptrolleyid,jdbcType=INTEGER},
      </if>
      <if test="orderno != null">
        orderNo = #{orderno,jdbcType=VARCHAR},
      </if>
      <if test="code != null">
        code = #{code,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="desc != null">
        desc = #{desc,jdbcType=VARCHAR},
      </if>
      <if test="price != null">
        price = #{price,jdbcType=DECIMAL},
      </if>
      <if test="devicelogo != null">
        deviceLogo = #{devicelogo,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        type = #{type,jdbcType=VARCHAR},
      </if>
      <if test="num != null">
        num = #{num,jdbcType=INTEGER},
      </if>
      <if test="userid != null">
        userId = #{userid,jdbcType=INTEGER},
      </if>
      <if test="logistno != null">
        logistNo = #{logistno,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=VARCHAR},
      </if>
      <if test="refundreason != null">
        refundReason = #{refundreason,jdbcType=VARCHAR},
      </if>
      <if test="rejectremark != null">
        rejectRemark = #{rejectremark,jdbcType=VARCHAR},
      </if>
      <if test="refundtype != null">
        refundType = #{refundtype,jdbcType=VARCHAR},
      </if>
      <if test="expressno != null">
        expressNo = #{expressno,jdbcType=VARCHAR},
      </if>
      <if test="refundexpressno != null">
        refundExpressNo = #{refundexpressno,jdbcType=VARCHAR},
      </if>
      <if test="refundamt != null">
        refundAmt = #{refundamt,jdbcType=DECIMAL},
      </if>
      <if test="refundno != null">
        refundNo = #{refundno,jdbcType=VARCHAR},
      </if>
      <if test="refundtime != null">
        refundTime = #{refundtime,jdbcType=TIMESTAMP},
      </if>
      <if test="refundremark != null">
        refundRemark = #{refundremark,jdbcType=VARCHAR},
      </if>
      <if test="postage != null">
        postage = #{postage,jdbcType=DECIMAL},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMercOrderDetail">
    update tb_pluss_merc_order_detail
    set shopTrolleyId = #{shoptrolleyid,jdbcType=INTEGER},
      orderNo = #{orderno,jdbcType=VARCHAR},
      code = #{code,jdbcType=VARCHAR},
      name = #{name,jdbcType=VARCHAR},
      desc = #{desc,jdbcType=VARCHAR},
      price = #{price,jdbcType=DECIMAL},
      deviceLogo = #{devicelogo,jdbcType=VARCHAR},
      type = #{type,jdbcType=VARCHAR},
      num = #{num,jdbcType=INTEGER},
      userId = #{userid,jdbcType=INTEGER},
      logistNo = #{logistno,jdbcType=VARCHAR},
      status = #{status,jdbcType=VARCHAR},
      refundReason = #{refundreason,jdbcType=VARCHAR},
      rejectRemark = #{rejectremark,jdbcType=VARCHAR},
      refundType = #{refundtype,jdbcType=VARCHAR},
      expressNo = #{expressno,jdbcType=VARCHAR},
      refundExpressNo = #{refundexpressno,jdbcType=VARCHAR},
      refundAmt = #{refundamt,jdbcType=DECIMAL},
      refundNo = #{refundno,jdbcType=VARCHAR},
      refundTime = #{refundtime,jdbcType=TIMESTAMP},
      refundRemark = #{refundremark,jdbcType=VARCHAR},
      postage = #{postage,jdbcType=DECIMAL},
      createTime = #{createtime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>