<?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.bonus.canteen.core.account.v3.mapper.AccTradeUseAmountHistMapper">

<!--    根据使用记录Id,查询可退款补贴使用记录-->
    <select id="canRefundTradeHist" resultType="com.bonus.canteen.core.account.v3.model.AccTradeUseAmountHist">
        SELECT *
        FROM `acc_trade_use_amount_hist`
        WHERE use_trade_id = #{useTradeId}
          AND use_amount <![CDATA[ > ]]> refund_amount
        ORDER BY id ASC;
    </select>

</mapper>
