<?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.zm.order.tool.server.chen.ChenPayDao">
    <resultMap id="BaseResultMap" type="com.zm.order.tool.server.model.pay">
        <id column="itemID" jdbcType="INTEGER" property="itemid" />
        <id column="reportDate" jdbcType="BIGINT" property="reportdate" />
        <result column="groupID" jdbcType="BIGINT" property="groupid" />
        <result column="brandID" jdbcType="BIGINT" property="brandid" />
        <result column="shopID" jdbcType="BIGINT" property="shopid" />
        <result column="saasOrderKey" jdbcType="VARCHAR" property="saasorderkey" />
        <result column="shopName" jdbcType="VARCHAR" property="shopname" />
        <result column="orderStatus" jdbcType="INTEGER" property="orderstatus" />
        <result column="checkoutBy" jdbcType="VARCHAR" property="checkoutby" />
        <result column="paySubjectKey" jdbcType="VARCHAR" property="paysubjectkey" />
        <result column="paySubjectCode" jdbcType="VARCHAR" property="paysubjectcode" />
        <result column="paySubjectName" jdbcType="VARCHAR" property="paysubjectname" />
        <result column="paySubjectGroupName" jdbcType="VARCHAR" property="paysubjectgroupname" />
        <result column="paySubjectRate" jdbcType="DECIMAL" property="paysubjectrate" />
        <result column="paySubjectCount" jdbcType="INTEGER" property="paysubjectcount" />
        <result column="isJoinReceived" jdbcType="TINYINT" property="isjoinreceived" />
        <result column="isPhysicalEvidence" jdbcType="TINYINT" property="isphysicalevidence" />
        <result column="isFeeJoinReceived" jdbcType="TINYINT" property="isfeejoinreceived" />
        <result column="isIncludeScore" jdbcType="TINYINT" property="isincludescore" />
        <result column="debitAmountGiftTotal" jdbcType="DECIMAL" property="debitamountgifttotal" />
        <result column="debitAmount" jdbcType="DECIMAL" property="debitamount" />
        <result column="creditAmount" jdbcType="DECIMAL" property="creditamount" />
        <result column="paySubjectRealAmount" jdbcType="DECIMAL" property="paysubjectrealamount" />
        <result column="paySubjectFeeAmount" jdbcType="DECIMAL" property="paysubjectfeeamount" />
        <result column="paySubjectDiscountAmount" jdbcType="DECIMAL" property="paysubjectdiscountamount" />
        <result column="paySubjectReceivedAmount" jdbcType="DECIMAL" property="paysubjectreceivedamount" />
        <result column="paySubjectAllDiscountAmount" jdbcType="DECIMAL" property="paysubjectalldiscountamount" />
        <result column="memberCardID" jdbcType="VARCHAR" property="membercardid" />
        <result column="promotionID" jdbcType="VARCHAR" property="promotionid" />
        <result column="programType" jdbcType="TINYINT" property="programtype" />
        <result column="payRemark" jdbcType="VARCHAR" property="payremark" />
        <result column="payTransNo" jdbcType="VARCHAR" property="paytransno" />
        <result column="payFrom" jdbcType="TINYINT" property="payfrom" />
        <result column="paymentID" jdbcType="VARCHAR" property="paymentid" />
        <result column="refundBy" jdbcType="VARCHAR" property="refundby" />
        <result column="createBy" jdbcType="VARCHAR" property="createby" />
        <result column="serverMAC" jdbcType="VARCHAR" property="servermac" />
        <result column="deviceName" jdbcType="VARCHAR" property="devicename" />
        <result column="actionTime" jdbcType="BIGINT" property="actiontime" />
        <result column="createTime" jdbcType="BIGINT" property="createtime" />
        <result column="action" jdbcType="INTEGER" property="action" />
        <result column="promotionCode" jdbcType="VARCHAR" property="promotioncode" />
        <result column="subjectNumber" jdbcType="VARCHAR" property="subjectnumber" />
        <result column="channelKey" jdbcType="VARCHAR" property="channelkey" />
        <result column="channelName" jdbcType="VARCHAR" property="channelname" />
        <result column="shiftName" jdbcType="VARCHAR" property="shiftname" />
        <result column="timeNameCheckout" jdbcType="VARCHAR" property="timenamecheckout" />
        <result column="orderSubType" jdbcType="TINYINT" property="ordersubtype" />
        <result column="actionstamp" jdbcType="TIMESTAMP" property="actionstamp" />
    </resultMap>
    <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.zm.order.tool.server.model.pay">
        <result column="giftItemNoLst" jdbcType="LONGVARCHAR" property="giftitemnolst" />
    </resultMap>
    <sql id="Base_Column_List">
        itemID, reportDate, groupID, brandID, shopID, saasOrderKey, shopName, orderStatus,
    checkoutBy, paySubjectKey, paySubjectCode, paySubjectName, paySubjectGroupName, paySubjectRate,
    paySubjectCount, isJoinReceived, isPhysicalEvidence, isFeeJoinReceived, isIncludeScore,
    debitAmountGiftTotal, debitAmount, creditAmount, paySubjectRealAmount, paySubjectFeeAmount,
    paySubjectDiscountAmount, paySubjectReceivedAmount, paySubjectAllDiscountAmount,
    memberCardID, promotionID, programType, payRemark, payTransNo, payFrom, paymentID,
    refundBy, createBy, serverMAC, deviceName, actionTime, createTime, action, promotionCode,
    subjectNumber, channelKey, channelName, shiftName, timeNameCheckout, orderSubType,
    actionstamp
    </sql>
    <sql id="Blob_Column_List">
        giftItemNoLst
    </sql>

    <select id="selectList" parameterType="map" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from
        tbl_bill_pay
        <where>
            saasOrderKey in
            <foreach collection="orderNoList" item="orderNo" index="index" open="(" close=")" separator=",">
                #{orderNo}
            </foreach>
        </where>
    </select>

    <select id="selectByPrimaryKey" parameterType="com.zm.order.tool.server.model.payKey" resultMap="ResultMapWithBLOBs">
        select
        <include refid="Base_Column_List" />
        ,
        <include refid="Blob_Column_List" />
        from tbl_bill_pay
        where itemID = #{itemid,jdbcType=INTEGER}
        and reportDate = #{reportdate,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="com.zm.order.tool.server.model.payKey">
        delete from tbl_bill_pay
        where itemID = #{itemid,jdbcType=INTEGER}
          and reportDate = #{reportdate,jdbcType=BIGINT}
    </delete>
    <insert id="insert" parameterType="com.zm.order.tool.server.model.pay">
        insert into tbl_bill_pay (itemID, reportDate, groupID,
                                  brandID, shopID, saasOrderKey,
                                  shopName, orderStatus, checkoutBy,
                                  paySubjectKey, paySubjectCode, paySubjectName,
                                  paySubjectGroupName, paySubjectRate, paySubjectCount,
                                  isJoinReceived, isPhysicalEvidence, isFeeJoinReceived,
                                  isIncludeScore, debitAmountGiftTotal, debitAmount,
                                  creditAmount, paySubjectRealAmount, paySubjectFeeAmount,
                                  paySubjectDiscountAmount, paySubjectReceivedAmount,
                                  paySubjectAllDiscountAmount, memberCardID,
                                  promotionID, programType, payRemark,
                                  payTransNo, payFrom, paymentID,
                                  refundBy, createBy, serverMAC,
                                  deviceName, actionTime, createTime,
                                  action, promotionCode, subjectNumber,
                                  channelKey, channelName, shiftName,
                                  timeNameCheckout, orderSubType, actionstamp,
                                  giftItemNoLst)
        values (#{itemid,jdbcType=INTEGER}, #{reportdate,jdbcType=BIGINT}, #{groupid,jdbcType=BIGINT},
                #{brandid,jdbcType=BIGINT}, #{shopid,jdbcType=BIGINT}, #{saasorderkey,jdbcType=VARCHAR},
                #{shopname,jdbcType=VARCHAR}, #{orderstatus,jdbcType=INTEGER}, #{checkoutby,jdbcType=VARCHAR},
                #{paysubjectkey,jdbcType=VARCHAR}, #{paysubjectcode,jdbcType=VARCHAR}, #{paysubjectname,jdbcType=VARCHAR},
                #{paysubjectgroupname,jdbcType=VARCHAR}, #{paysubjectrate,jdbcType=DECIMAL}, #{paysubjectcount,jdbcType=INTEGER},
                #{isjoinreceived,jdbcType=TINYINT}, #{isphysicalevidence,jdbcType=TINYINT}, #{isfeejoinreceived,jdbcType=TINYINT},
                #{isincludescore,jdbcType=TINYINT}, #{debitamountgifttotal,jdbcType=DECIMAL}, #{debitamount,jdbcType=DECIMAL},
                #{creditamount,jdbcType=DECIMAL}, #{paysubjectrealamount,jdbcType=DECIMAL}, #{paysubjectfeeamount,jdbcType=DECIMAL},
                #{paysubjectdiscountamount,jdbcType=DECIMAL}, #{paysubjectreceivedamount,jdbcType=DECIMAL},
                #{paysubjectalldiscountamount,jdbcType=DECIMAL}, #{membercardid,jdbcType=VARCHAR},
                #{promotionid,jdbcType=VARCHAR}, #{programtype,jdbcType=TINYINT}, #{payremark,jdbcType=VARCHAR},
                #{paytransno,jdbcType=VARCHAR}, #{payfrom,jdbcType=TINYINT}, #{paymentid,jdbcType=VARCHAR},
                #{refundby,jdbcType=VARCHAR}, #{createby,jdbcType=VARCHAR}, #{servermac,jdbcType=VARCHAR},
                #{devicename,jdbcType=VARCHAR}, #{actiontime,jdbcType=BIGINT}, #{createtime,jdbcType=BIGINT},
                #{action,jdbcType=INTEGER}, #{promotioncode,jdbcType=VARCHAR}, #{subjectnumber,jdbcType=VARCHAR},
                #{channelkey,jdbcType=VARCHAR}, #{channelname,jdbcType=VARCHAR}, #{shiftname,jdbcType=VARCHAR},
                #{timenamecheckout,jdbcType=VARCHAR}, #{ordersubtype,jdbcType=TINYINT}, #{actionstamp,jdbcType=TIMESTAMP},
                #{giftitemnolst,jdbcType=LONGVARCHAR})
    </insert>
    <insert id="insertSelective" parameterType="com.zm.order.tool.server.model.pay">
        insert into tbl_bill_pay
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="itemid != null">
                itemID,
            </if>
            <if test="reportdate != null">
                reportDate,
            </if>
            <if test="groupid != null">
                groupID,
            </if>
            <if test="brandid != null">
                brandID,
            </if>
            <if test="shopid != null">
                shopID,
            </if>
            <if test="saasorderkey != null">
                saasOrderKey,
            </if>
            <if test="shopname != null">
                shopName,
            </if>
            <if test="orderstatus != null">
                orderStatus,
            </if>
            <if test="checkoutby != null">
                checkoutBy,
            </if>
            <if test="paysubjectkey != null">
                paySubjectKey,
            </if>
            <if test="paysubjectcode != null">
                paySubjectCode,
            </if>
            <if test="paysubjectname != null">
                paySubjectName,
            </if>
            <if test="paysubjectgroupname != null">
                paySubjectGroupName,
            </if>
            <if test="paysubjectrate != null">
                paySubjectRate,
            </if>
            <if test="paysubjectcount != null">
                paySubjectCount,
            </if>
            <if test="isjoinreceived != null">
                isJoinReceived,
            </if>
            <if test="isphysicalevidence != null">
                isPhysicalEvidence,
            </if>
            <if test="isfeejoinreceived != null">
                isFeeJoinReceived,
            </if>
            <if test="isincludescore != null">
                isIncludeScore,
            </if>
            <if test="debitamountgifttotal != null">
                debitAmountGiftTotal,
            </if>
            <if test="debitamount != null">
                debitAmount,
            </if>
            <if test="creditamount != null">
                creditAmount,
            </if>
            <if test="paysubjectrealamount != null">
                paySubjectRealAmount,
            </if>
            <if test="paysubjectfeeamount != null">
                paySubjectFeeAmount,
            </if>
            <if test="paysubjectdiscountamount != null">
                paySubjectDiscountAmount,
            </if>
            <if test="paysubjectreceivedamount != null">
                paySubjectReceivedAmount,
            </if>
            <if test="paysubjectalldiscountamount != null">
                paySubjectAllDiscountAmount,
            </if>
            <if test="membercardid != null">
                memberCardID,
            </if>
            <if test="promotionid != null">
                promotionID,
            </if>
            <if test="programtype != null">
                programType,
            </if>
            <if test="payremark != null">
                payRemark,
            </if>
            <if test="paytransno != null">
                payTransNo,
            </if>
            <if test="payfrom != null">
                payFrom,
            </if>
            <if test="paymentid != null">
                paymentID,
            </if>
            <if test="refundby != null">
                refundBy,
            </if>
            <if test="createby != null">
                createBy,
            </if>
            <if test="servermac != null">
                serverMAC,
            </if>
            <if test="devicename != null">
                deviceName,
            </if>
            <if test="actiontime != null">
                actionTime,
            </if>
            <if test="createtime != null">
                createTime,
            </if>
            <if test="action != null">
                action,
            </if>
            <if test="promotioncode != null">
                promotionCode,
            </if>
            <if test="subjectnumber != null">
                subjectNumber,
            </if>
            <if test="channelkey != null">
                channelKey,
            </if>
            <if test="channelname != null">
                channelName,
            </if>
            <if test="shiftname != null">
                shiftName,
            </if>
            <if test="timenamecheckout != null">
                timeNameCheckout,
            </if>
            <if test="ordersubtype != null">
                orderSubType,
            </if>
            <if test="actionstamp != null">
                actionstamp,
            </if>
            <if test="giftitemnolst != null">
                giftItemNoLst,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="itemid != null">
                #{itemid,jdbcType=INTEGER},
            </if>
            <if test="reportdate != null">
                #{reportdate,jdbcType=BIGINT},
            </if>
            <if test="groupid != null">
                #{groupid,jdbcType=BIGINT},
            </if>
            <if test="brandid != null">
                #{brandid,jdbcType=BIGINT},
            </if>
            <if test="shopid != null">
                #{shopid,jdbcType=BIGINT},
            </if>
            <if test="saasorderkey != null">
                #{saasorderkey,jdbcType=VARCHAR},
            </if>
            <if test="shopname != null">
                #{shopname,jdbcType=VARCHAR},
            </if>
            <if test="orderstatus != null">
                #{orderstatus,jdbcType=INTEGER},
            </if>
            <if test="checkoutby != null">
                #{checkoutby,jdbcType=VARCHAR},
            </if>
            <if test="paysubjectkey != null">
                #{paysubjectkey,jdbcType=VARCHAR},
            </if>
            <if test="paysubjectcode != null">
                #{paysubjectcode,jdbcType=VARCHAR},
            </if>
            <if test="paysubjectname != null">
                #{paysubjectname,jdbcType=VARCHAR},
            </if>
            <if test="paysubjectgroupname != null">
                #{paysubjectgroupname,jdbcType=VARCHAR},
            </if>
            <if test="paysubjectrate != null">
                #{paysubjectrate,jdbcType=DECIMAL},
            </if>
            <if test="paysubjectcount != null">
                #{paysubjectcount,jdbcType=INTEGER},
            </if>
            <if test="isjoinreceived != null">
                #{isjoinreceived,jdbcType=TINYINT},
            </if>
            <if test="isphysicalevidence != null">
                #{isphysicalevidence,jdbcType=TINYINT},
            </if>
            <if test="isfeejoinreceived != null">
                #{isfeejoinreceived,jdbcType=TINYINT},
            </if>
            <if test="isincludescore != null">
                #{isincludescore,jdbcType=TINYINT},
            </if>
            <if test="debitamountgifttotal != null">
                #{debitamountgifttotal,jdbcType=DECIMAL},
            </if>
            <if test="debitamount != null">
                #{debitamount,jdbcType=DECIMAL},
            </if>
            <if test="creditamount != null">
                #{creditamount,jdbcType=DECIMAL},
            </if>
            <if test="paysubjectrealamount != null">
                #{paysubjectrealamount,jdbcType=DECIMAL},
            </if>
            <if test="paysubjectfeeamount != null">
                #{paysubjectfeeamount,jdbcType=DECIMAL},
            </if>
            <if test="paysubjectdiscountamount != null">
                #{paysubjectdiscountamount,jdbcType=DECIMAL},
            </if>
            <if test="paysubjectreceivedamount != null">
                #{paysubjectreceivedamount,jdbcType=DECIMAL},
            </if>
            <if test="paysubjectalldiscountamount != null">
                #{paysubjectalldiscountamount,jdbcType=DECIMAL},
            </if>
            <if test="membercardid != null">
                #{membercardid,jdbcType=VARCHAR},
            </if>
            <if test="promotionid != null">
                #{promotionid,jdbcType=VARCHAR},
            </if>
            <if test="programtype != null">
                #{programtype,jdbcType=TINYINT},
            </if>
            <if test="payremark != null">
                #{payremark,jdbcType=VARCHAR},
            </if>
            <if test="paytransno != null">
                #{paytransno,jdbcType=VARCHAR},
            </if>
            <if test="payfrom != null">
                #{payfrom,jdbcType=TINYINT},
            </if>
            <if test="paymentid != null">
                #{paymentid,jdbcType=VARCHAR},
            </if>
            <if test="refundby != null">
                #{refundby,jdbcType=VARCHAR},
            </if>
            <if test="createby != null">
                #{createby,jdbcType=VARCHAR},
            </if>
            <if test="servermac != null">
                #{servermac,jdbcType=VARCHAR},
            </if>
            <if test="devicename != null">
                #{devicename,jdbcType=VARCHAR},
            </if>
            <if test="actiontime != null">
                #{actiontime,jdbcType=BIGINT},
            </if>
            <if test="createtime != null">
                #{createtime,jdbcType=BIGINT},
            </if>
            <if test="action != null">
                #{action,jdbcType=INTEGER},
            </if>
            <if test="promotioncode != null">
                #{promotioncode,jdbcType=VARCHAR},
            </if>
            <if test="subjectnumber != null">
                #{subjectnumber,jdbcType=VARCHAR},
            </if>
            <if test="channelkey != null">
                #{channelkey,jdbcType=VARCHAR},
            </if>
            <if test="channelname != null">
                #{channelname,jdbcType=VARCHAR},
            </if>
            <if test="shiftname != null">
                #{shiftname,jdbcType=VARCHAR},
            </if>
            <if test="timenamecheckout != null">
                #{timenamecheckout,jdbcType=VARCHAR},
            </if>
            <if test="ordersubtype != null">
                #{ordersubtype,jdbcType=TINYINT},
            </if>
            <if test="actionstamp != null">
                #{actionstamp,jdbcType=TIMESTAMP},
            </if>
            <if test="giftitemnolst != null">
                #{giftitemnolst,jdbcType=LONGVARCHAR},
            </if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.zm.order.tool.server.model.pay">
        update tbl_bill_pay
        <set>
            <if test="groupid != null">
                groupID = #{groupid,jdbcType=BIGINT},
            </if>
            <if test="brandid != null">
                brandID = #{brandid,jdbcType=BIGINT},
            </if>
            <if test="shopid != null">
                shopID = #{shopid,jdbcType=BIGINT},
            </if>
            <if test="saasorderkey != null">
                saasOrderKey = #{saasorderkey,jdbcType=VARCHAR},
            </if>
            <if test="shopname != null">
                shopName = #{shopname,jdbcType=VARCHAR},
            </if>
            <if test="orderstatus != null">
                orderStatus = #{orderstatus,jdbcType=INTEGER},
            </if>
            <if test="checkoutby != null">
                checkoutBy = #{checkoutby,jdbcType=VARCHAR},
            </if>
            <if test="paysubjectkey != null">
                paySubjectKey = #{paysubjectkey,jdbcType=VARCHAR},
            </if>
            <if test="paysubjectcode != null">
                paySubjectCode = #{paysubjectcode,jdbcType=VARCHAR},
            </if>
            <if test="paysubjectname != null">
                paySubjectName = #{paysubjectname,jdbcType=VARCHAR},
            </if>
            <if test="paysubjectgroupname != null">
                paySubjectGroupName = #{paysubjectgroupname,jdbcType=VARCHAR},
            </if>
            <if test="paysubjectrate != null">
                paySubjectRate = #{paysubjectrate,jdbcType=DECIMAL},
            </if>
            <if test="paysubjectcount != null">
                paySubjectCount = #{paysubjectcount,jdbcType=INTEGER},
            </if>
            <if test="isjoinreceived != null">
                isJoinReceived = #{isjoinreceived,jdbcType=TINYINT},
            </if>
            <if test="isphysicalevidence != null">
                isPhysicalEvidence = #{isphysicalevidence,jdbcType=TINYINT},
            </if>
            <if test="isfeejoinreceived != null">
                isFeeJoinReceived = #{isfeejoinreceived,jdbcType=TINYINT},
            </if>
            <if test="isincludescore != null">
                isIncludeScore = #{isincludescore,jdbcType=TINYINT},
            </if>
            <if test="debitamountgifttotal != null">
                debitAmountGiftTotal = #{debitamountgifttotal,jdbcType=DECIMAL},
            </if>
            <if test="debitamount != null">
                debitAmount = #{debitamount,jdbcType=DECIMAL},
            </if>
            <if test="creditamount != null">
                creditAmount = #{creditamount,jdbcType=DECIMAL},
            </if>
            <if test="paysubjectrealamount != null">
                paySubjectRealAmount = #{paysubjectrealamount,jdbcType=DECIMAL},
            </if>
            <if test="paysubjectfeeamount != null">
                paySubjectFeeAmount = #{paysubjectfeeamount,jdbcType=DECIMAL},
            </if>
            <if test="paysubjectdiscountamount != null">
                paySubjectDiscountAmount = #{paysubjectdiscountamount,jdbcType=DECIMAL},
            </if>
            <if test="paysubjectreceivedamount != null">
                paySubjectReceivedAmount = #{paysubjectreceivedamount,jdbcType=DECIMAL},
            </if>
            <if test="paysubjectalldiscountamount != null">
                paySubjectAllDiscountAmount = #{paysubjectalldiscountamount,jdbcType=DECIMAL},
            </if>
            <if test="membercardid != null">
                memberCardID = #{membercardid,jdbcType=VARCHAR},
            </if>
            <if test="promotionid != null">
                promotionID = #{promotionid,jdbcType=VARCHAR},
            </if>
            <if test="programtype != null">
                programType = #{programtype,jdbcType=TINYINT},
            </if>
            <if test="payremark != null">
                payRemark = #{payremark,jdbcType=VARCHAR},
            </if>
            <if test="paytransno != null">
                payTransNo = #{paytransno,jdbcType=VARCHAR},
            </if>
            <if test="payfrom != null">
                payFrom = #{payfrom,jdbcType=TINYINT},
            </if>
            <if test="paymentid != null">
                paymentID = #{paymentid,jdbcType=VARCHAR},
            </if>
            <if test="refundby != null">
                refundBy = #{refundby,jdbcType=VARCHAR},
            </if>
            <if test="createby != null">
                createBy = #{createby,jdbcType=VARCHAR},
            </if>
            <if test="servermac != null">
                serverMAC = #{servermac,jdbcType=VARCHAR},
            </if>
            <if test="devicename != null">
                deviceName = #{devicename,jdbcType=VARCHAR},
            </if>
            <if test="actiontime != null">
                actionTime = #{actiontime,jdbcType=BIGINT},
            </if>
            <if test="createtime != null">
                createTime = #{createtime,jdbcType=BIGINT},
            </if>
            <if test="action != null">
                action = #{action,jdbcType=INTEGER},
            </if>
            <if test="promotioncode != null">
                promotionCode = #{promotioncode,jdbcType=VARCHAR},
            </if>
            <if test="subjectnumber != null">
                subjectNumber = #{subjectnumber,jdbcType=VARCHAR},
            </if>
            <if test="channelkey != null">
                channelKey = #{channelkey,jdbcType=VARCHAR},
            </if>
            <if test="channelname != null">
                channelName = #{channelname,jdbcType=VARCHAR},
            </if>
            <if test="shiftname != null">
                shiftName = #{shiftname,jdbcType=VARCHAR},
            </if>
            <if test="timenamecheckout != null">
                timeNameCheckout = #{timenamecheckout,jdbcType=VARCHAR},
            </if>
            <if test="ordersubtype != null">
                orderSubType = #{ordersubtype,jdbcType=TINYINT},
            </if>
            <if test="actionstamp != null">
                actionstamp = #{actionstamp,jdbcType=TIMESTAMP},
            </if>
            <if test="giftitemnolst != null">
                giftItemNoLst = #{giftitemnolst,jdbcType=LONGVARCHAR},
            </if>
        </set>
        where itemID = #{itemid,jdbcType=INTEGER}
        and reportDate = #{reportdate,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.zm.order.tool.server.model.pay">
        update tbl_bill_pay
        set groupID = #{groupid,jdbcType=BIGINT},
            brandID = #{brandid,jdbcType=BIGINT},
            shopID = #{shopid,jdbcType=BIGINT},
            saasOrderKey = #{saasorderkey,jdbcType=VARCHAR},
            shopName = #{shopname,jdbcType=VARCHAR},
            orderStatus = #{orderstatus,jdbcType=INTEGER},
            checkoutBy = #{checkoutby,jdbcType=VARCHAR},
            paySubjectKey = #{paysubjectkey,jdbcType=VARCHAR},
            paySubjectCode = #{paysubjectcode,jdbcType=VARCHAR},
            paySubjectName = #{paysubjectname,jdbcType=VARCHAR},
            paySubjectGroupName = #{paysubjectgroupname,jdbcType=VARCHAR},
            paySubjectRate = #{paysubjectrate,jdbcType=DECIMAL},
            paySubjectCount = #{paysubjectcount,jdbcType=INTEGER},
            isJoinReceived = #{isjoinreceived,jdbcType=TINYINT},
            isPhysicalEvidence = #{isphysicalevidence,jdbcType=TINYINT},
            isFeeJoinReceived = #{isfeejoinreceived,jdbcType=TINYINT},
            isIncludeScore = #{isincludescore,jdbcType=TINYINT},
            debitAmountGiftTotal = #{debitamountgifttotal,jdbcType=DECIMAL},
            debitAmount = #{debitamount,jdbcType=DECIMAL},
            creditAmount = #{creditamount,jdbcType=DECIMAL},
            paySubjectRealAmount = #{paysubjectrealamount,jdbcType=DECIMAL},
            paySubjectFeeAmount = #{paysubjectfeeamount,jdbcType=DECIMAL},
            paySubjectDiscountAmount = #{paysubjectdiscountamount,jdbcType=DECIMAL},
            paySubjectReceivedAmount = #{paysubjectreceivedamount,jdbcType=DECIMAL},
            paySubjectAllDiscountAmount = #{paysubjectalldiscountamount,jdbcType=DECIMAL},
            memberCardID = #{membercardid,jdbcType=VARCHAR},
            promotionID = #{promotionid,jdbcType=VARCHAR},
            programType = #{programtype,jdbcType=TINYINT},
            payRemark = #{payremark,jdbcType=VARCHAR},
            payTransNo = #{paytransno,jdbcType=VARCHAR},
            payFrom = #{payfrom,jdbcType=TINYINT},
            paymentID = #{paymentid,jdbcType=VARCHAR},
            refundBy = #{refundby,jdbcType=VARCHAR},
            createBy = #{createby,jdbcType=VARCHAR},
            serverMAC = #{servermac,jdbcType=VARCHAR},
            deviceName = #{devicename,jdbcType=VARCHAR},
            actionTime = #{actiontime,jdbcType=BIGINT},
            createTime = #{createtime,jdbcType=BIGINT},
            action = #{action,jdbcType=INTEGER},
            promotionCode = #{promotioncode,jdbcType=VARCHAR},
            subjectNumber = #{subjectnumber,jdbcType=VARCHAR},
            channelKey = #{channelkey,jdbcType=VARCHAR},
            channelName = #{channelname,jdbcType=VARCHAR},
            shiftName = #{shiftname,jdbcType=VARCHAR},
            timeNameCheckout = #{timenamecheckout,jdbcType=VARCHAR},
            orderSubType = #{ordersubtype,jdbcType=TINYINT},
            actionstamp = #{actionstamp,jdbcType=TIMESTAMP},
            giftItemNoLst = #{giftitemnolst,jdbcType=LONGVARCHAR}
        where itemID = #{itemid,jdbcType=INTEGER}
          and reportDate = #{reportdate,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.zm.order.tool.server.model.pay">
        update tbl_bill_pay
        set groupID = #{groupid,jdbcType=BIGINT},
            brandID = #{brandid,jdbcType=BIGINT},
            shopID = #{shopid,jdbcType=BIGINT},
            saasOrderKey = #{saasorderkey,jdbcType=VARCHAR},
            shopName = #{shopname,jdbcType=VARCHAR},
            orderStatus = #{orderstatus,jdbcType=INTEGER},
            checkoutBy = #{checkoutby,jdbcType=VARCHAR},
            paySubjectKey = #{paysubjectkey,jdbcType=VARCHAR},
            paySubjectCode = #{paysubjectcode,jdbcType=VARCHAR},
            paySubjectName = #{paysubjectname,jdbcType=VARCHAR},
            paySubjectGroupName = #{paysubjectgroupname,jdbcType=VARCHAR},
            paySubjectRate = #{paysubjectrate,jdbcType=DECIMAL},
            paySubjectCount = #{paysubjectcount,jdbcType=INTEGER},
            isJoinReceived = #{isjoinreceived,jdbcType=TINYINT},
            isPhysicalEvidence = #{isphysicalevidence,jdbcType=TINYINT},
            isFeeJoinReceived = #{isfeejoinreceived,jdbcType=TINYINT},
            isIncludeScore = #{isincludescore,jdbcType=TINYINT},
            debitAmountGiftTotal = #{debitamountgifttotal,jdbcType=DECIMAL},
            debitAmount = #{debitamount,jdbcType=DECIMAL},
            creditAmount = #{creditamount,jdbcType=DECIMAL},
            paySubjectRealAmount = #{paysubjectrealamount,jdbcType=DECIMAL},
            paySubjectFeeAmount = #{paysubjectfeeamount,jdbcType=DECIMAL},
            paySubjectDiscountAmount = #{paysubjectdiscountamount,jdbcType=DECIMAL},
            paySubjectReceivedAmount = #{paysubjectreceivedamount,jdbcType=DECIMAL},
            paySubjectAllDiscountAmount = #{paysubjectalldiscountamount,jdbcType=DECIMAL},
            memberCardID = #{membercardid,jdbcType=VARCHAR},
            promotionID = #{promotionid,jdbcType=VARCHAR},
            programType = #{programtype,jdbcType=TINYINT},
            payRemark = #{payremark,jdbcType=VARCHAR},
            payTransNo = #{paytransno,jdbcType=VARCHAR},
            payFrom = #{payfrom,jdbcType=TINYINT},
            paymentID = #{paymentid,jdbcType=VARCHAR},
            refundBy = #{refundby,jdbcType=VARCHAR},
            createBy = #{createby,jdbcType=VARCHAR},
            serverMAC = #{servermac,jdbcType=VARCHAR},
            deviceName = #{devicename,jdbcType=VARCHAR},
            actionTime = #{actiontime,jdbcType=BIGINT},
            createTime = #{createtime,jdbcType=BIGINT},
            action = #{action,jdbcType=INTEGER},
            promotionCode = #{promotioncode,jdbcType=VARCHAR},
            subjectNumber = #{subjectnumber,jdbcType=VARCHAR},
            channelKey = #{channelkey,jdbcType=VARCHAR},
            channelName = #{channelname,jdbcType=VARCHAR},
            shiftName = #{shiftname,jdbcType=VARCHAR},
            timeNameCheckout = #{timenamecheckout,jdbcType=VARCHAR},
            orderSubType = #{ordersubtype,jdbcType=TINYINT},
            actionstamp = #{actionstamp,jdbcType=TIMESTAMP}
        where itemID = #{itemid,jdbcType=INTEGER}
          and reportDate = #{reportdate,jdbcType=BIGINT}
    </update>
</mapper>