Helius
2021-05-21 d30d959c8f249c20b39e66dd0c48341a77751d21
src/main/resources/mapper/otc/OtcEntrustOrderDao.xml
@@ -17,13 +17,14 @@
        left join otc_market_bussiness b on a.member_id=b.member_id
        left join member c on a.member_id=c.id
        <where>
            a.status=1
            a.status=1 and a.remain_coin_amount > 0
            <if test="record != null">
                <if test="record.type != null and record.type!=''">
                    and order_type = #{record.type}
                </if>
            </if>
        </where>
        order by a.create_time desc
    </select>
    <select id="selectEntrustOrderByOrderType" resultType="com.xcong.excoin.modules.otc.entity.OtcEntrustOrder">
@@ -44,6 +45,25 @@
        </where>
    </select>
    <select id="selectOwnEntrustListInPage" resultType="com.xcong.excoin.modules.otc.entity.OtcEntrustOrder">
        select * from otc_entrust_order
        <where>
            <if test="record.orderType != null and record.orderType != ''" >
                and order_type = #{record.orderType}
            </if>
            <if test="record.memberId != null">
                and member_id = #{record.memberId}
            </if>
            <if test="record.status != null and record.status == 3">
                and status != #{record.status}
            </if>
            <if test="record.status != null and record.status != 3">
                and status == #{record.status}
            </if>
        </where>
        order by create_time desc
    </select>
    <update id="updateRemainAmount">
        update otc_entrust_order
        set remain_coin_amount = remain_coin_amount + ${amount}