130 lines
7.6 KiB
XML
130 lines
7.6 KiB
XML
<?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.ruoyi.system.mapper.EtReconciliationMapper">
|
|
|
|
<resultMap type="EtReconciliation" id="EtReconciliationResult">
|
|
<result property="reconciliationId" column="reconciliation_id" />
|
|
<result property="orderPaid" column="order_paid" />
|
|
<result property="totalAmount" column="total_amount" />
|
|
<result property="depositPaid" column="deposit_paid" />
|
|
<result property="payChannel" column="pay_channel" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="day" column="day" />
|
|
<result property="depositRefund" column="deposit_refund" />
|
|
<result property="deductionAmount" column="deduction_amount" />
|
|
<result property="handlingCharge" column="handling_charge" />
|
|
<result property="userReceipts" column="user_receipts" />
|
|
<result property="settlementAmount" column="settlement_amount" />
|
|
<result property="platformServiceFee" column="platform_service_fee" />
|
|
<result property="orderRefund" column="order_refund" />
|
|
<result property="orderSurplus" column="order_surplus" />
|
|
<result property="depositSurplus" column="deposit_surplus" />
|
|
</resultMap>
|
|
|
|
<sql id="selectEtReconciliationVo">
|
|
select reconciliation_id, order_paid, total_amount, deposit_paid, pay_channel, create_time, day, deposit_refund, deduction_amount,
|
|
handling_charge, user_receipts, settlement_amount, platform_service_fee, order_refund, order_surplus, deposit_surplus from et_reconciliation
|
|
</sql>
|
|
|
|
<select id="selectEtReconciliationList" parameterType="EtReconciliation" resultMap="EtReconciliationResult">
|
|
<include refid="selectEtReconciliationVo"/>
|
|
<where>
|
|
<if test="orderPaid != null "> and order_paid = #{orderPaid}</if>
|
|
<if test="depositPaid != null "> and deposit_paid = #{depositPaid}</if>
|
|
<if test="payChannel != null "> and pay_channel = #{payChannel}</if>
|
|
<if test="day != null "> and day = #{day}</if>
|
|
<if test="depositRefund != null "> and deposit_refund = #{depositRefund}</if>
|
|
<if test="deductionAmount != null "> and deduction_amount = #{deductionAmount}</if>
|
|
<if test="handlingCharge != null "> and handling_charge = #{handlingCharge}</if>
|
|
<if test="userReceipts != null "> and user_receipts = #{userReceipts}</if>
|
|
<if test="settlementAmount != null "> and settlement_amount = #{settlementAmount}</if>
|
|
<if test="platformServiceFee != null "> and platform_service_fee = #{platformServiceFee}</if>
|
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
|
AND `day` >= #{params.beginTime}
|
|
</if>
|
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
|
AND `day` <= #{params.endTime}
|
|
</if>
|
|
</where>
|
|
order by `day` desc
|
|
</select>
|
|
|
|
<select id="selectEtReconciliationByReconciliationId" parameterType="Long" resultMap="EtReconciliationResult">
|
|
<include refid="selectEtReconciliationVo"/>
|
|
where reconciliation_id = #{reconciliationId}
|
|
</select>
|
|
|
|
<insert id="insertEtReconciliation" parameterType="EtReconciliation" useGeneratedKeys="true" keyProperty="reconciliationId">
|
|
insert into et_reconciliation
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="orderPaid != null">order_paid,</if>
|
|
<if test="totalAmount != null">total_amount,</if>
|
|
<if test="depositPaid != null">deposit_paid,</if>
|
|
<if test="payChannel != null">pay_channel,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="day != null">day,</if>
|
|
<if test="depositRefund != null">deposit_refund,</if>
|
|
<if test="deductionAmount != null">deduction_amount,</if>
|
|
<if test="handlingCharge != null">handling_charge,</if>
|
|
<if test="userReceipts != null">user_receipts,</if>
|
|
<if test="settlementAmount != null">settlement_amount,</if>
|
|
<if test="platformServiceFee != null">platform_service_fee,</if>
|
|
<if test="depositSurplus != null">deposit_surplus,</if>
|
|
<if test="orderRefund != null">order_refund,</if>
|
|
<if test="orderSurplus != null">order_surplus,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="orderPaid != null">#{orderPaid},</if>
|
|
<if test="totalAmount != null">#{totalAmount},</if>
|
|
<if test="depositPaid != null">#{depositPaid},</if>
|
|
<if test="payChannel != null">#{payChannel},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="day != null">#{day},</if>
|
|
<if test="depositRefund != null">#{depositRefund},</if>
|
|
<if test="deductionAmount != null">#{deductionAmount},</if>
|
|
<if test="handlingCharge != null">#{handlingCharge},</if>
|
|
<if test="userReceipts != null">#{userReceipts},</if>
|
|
<if test="settlementAmount != null">#{settlementAmount},</if>
|
|
<if test="platformServiceFee != null">#{platformServiceFee},</if>
|
|
<if test="depositSurplus != null">#{depositSurplus},</if>
|
|
<if test="orderRefund != null">#{orderRefund},</if>
|
|
<if test="orderSurplus != null">#{orderSurplus},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateEtReconciliation" parameterType="EtReconciliation">
|
|
update et_reconciliation
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="orderPaid != null">order_paid = #{orderPaid},</if>
|
|
<if test="totalAmount != null">total_amount = #{totalAmount},</if>
|
|
<if test="depositPaid != null">deposit_paid = #{depositPaid},</if>
|
|
<if test="payChannel != null">pay_channel = #{payChannel},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="day != null">day = #{day},</if>
|
|
<if test="depositRefund != null">deposit_refund = #{depositRefund},</if>
|
|
<if test="deductionAmount != null">deduction_amount = #{deductionAmount},</if>
|
|
<if test="handlingCharge != null">handling_charge = #{handlingCharge},</if>
|
|
<if test="userReceipts != null">user_receipts = #{userReceipts},</if>
|
|
<if test="settlementAmount != null">settlement_amount = #{settlementAmount},</if>
|
|
<if test="platformServiceFee != null">platform_service_fee = #{platformServiceFee},</if>
|
|
<if test="depositSurplus != null">deposit_surplus = #{depositSurplus},</if>
|
|
<if test="orderRefund != null">order_refund = #{orderRefund},</if>
|
|
<if test="orderSurplus != null">order_surplus = #{orderSurplus},</if>
|
|
</trim>
|
|
where reconciliation_id = #{reconciliationId}
|
|
</update>
|
|
|
|
<delete id="deleteEtReconciliationByReconciliationId" parameterType="Long">
|
|
delete from et_reconciliation where reconciliation_id = #{reconciliationId}
|
|
</delete>
|
|
|
|
<delete id="deleteEtReconciliationByReconciliationIds" parameterType="String">
|
|
delete from et_reconciliation where reconciliation_id in
|
|
<foreach item="reconciliationId" collection="array" open="(" separator="," close=")">
|
|
#{reconciliationId}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|