<?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="SYxglCzkCzkxfTransactionrecordMapper" >
    <!-- 通用查询映射结果 -->

    <select id="selectSYxglCzkCzkxfTransactionrecordList" parameterType="pd" resultType="pd">
        select * from s_yxgl_czk_czkxf_transactionrecord where 1=1
        <if test="transactionTime !=null and transactionTime !='' ">
            and transactionTime = #{transactionTime}
        </if>
        <if test="transactionStore !=null and transactionStore !='' ">
            and transactionStore = #{transactionStore}
        </if>
        <if test="cardNumber !=null and cardNumber !='' ">
            and cardNumber = #{cardNumber}
        </if>
        <if test="orderNumber !=null and orderNumber !='' ">
            and orderNumber = #{orderNumber}
        </if>
        <if test="paymentAmount !=null and paymentAmount !='' ">
            and paymentAmount = #{paymentAmount}
        </if>
        <if test="rechargeAmount !=null and rechargeAmount !='' ">
            and rechargeAmount = #{rechargeAmount}
        </if>
        <if test="cashier !=null and cashier !='' ">
            and cashier = #{cashier}
        </if>
    </select>


    <update id="updateSYxglCzkCzkxfTransactionrecord" parameterType="pd" >
        update s_yxgl_czk_czkxf_transactionrecord
        <trim prefix=" SET " suffix="" prefixOverrides="," suffixOverrides=",">
        <if test="transactionTime !=null and transactionTime !='' ">
            transactionTime = #{transactionTime},
        </if>
        <if test="transactionStore !=null and transactionStore !='' ">
            transactionStore = #{transactionStore},
        </if>
        <if test="cardNumber !=null and cardNumber !='' ">
            cardNumber = #{cardNumber},
        </if>
        <if test="orderNumber !=null and orderNumber !='' ">
            orderNumber = #{orderNumber},
        </if>
        <if test="paymentAmount !=null and paymentAmount !='' ">
            paymentAmount = #{paymentAmount},
        </if>
        <if test="rechargeAmount !=null and rechargeAmount !='' ">
            rechargeAmount = #{rechargeAmount},
        </if>
        <if test="cashier !=null and cashier !='' ">
            cashier = #{cashier},
        </if>
        </trim>
        <if test="up != null and up!=''">
            <if test="id != null and id!=''">
                where id=#{id}
            </if>
        </if>
    </update>

    <delete id="SYxglCzkCzkxfTransactionrecordRemove" parameterType="pd">
        <if test="ids != null">
            delete from s_yxgl_czk_czkxf_transactionrecord where
            <if test="ids != null">
                id in(${ids})
            </if>
        </if>
    </delete>

    <insert id="addSYxglCzkCzkxfTransactionrecord" parameterType="pd" >

        insert into s_yxgl_czk_czkxf_transactionrecord
        <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">

        <if test="transactionTime !=null and transactionTime !='' ">
            transactionTime,
        </if>
        <if test="transactionStore !=null and transactionStore !='' ">
            transactionStore,
        </if>
        <if test="cardNumber !=null and cardNumber !='' ">
            cardNumber,
        </if>
        <if test="orderNumber !=null and orderNumber !='' ">
            orderNumber,
        </if>
        <if test="paymentAmount !=null and paymentAmount !='' ">
            paymentAmount,
        </if>
        <if test="rechargeAmount !=null and rechargeAmount !='' ">
            rechargeAmount,
        </if>
        <if test="cashier !=null and cashier !='' ">
            cashier,
        </if>
        </trim>
        <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
        <if test="transactionTime !=null and transactionTime !='' ">
             #{transactionTime},
        </if>
        <if test="transactionStore !=null and transactionStore !='' ">
             #{transactionStore},
        </if>
        <if test="cardNumber !=null and cardNumber !='' ">
             #{cardNumber},
        </if>
        <if test="orderNumber !=null and orderNumber !='' ">
             #{orderNumber},
        </if>
        <if test="paymentAmount !=null and paymentAmount !='' ">
             #{paymentAmount},
        </if>
        <if test="rechargeAmount !=null and rechargeAmount !='' ">
             #{rechargeAmount},
        </if>
        <if test="cashier !=null and cashier !='' ">
             #{cashier},
        </if>
        </trim>

    </insert>

</mapper>
