zyy
2025-10-29 86a85ccd8200da512ee36a7607a6dccd7fc008cd
trading-order-service/src/main/resources/mapper/dz/StockDzMapper.xml
@@ -43,26 +43,30 @@
        ORDER BY  add_time DESC
    </select>
    <select id="getDzOrderList" resultType="com.yami.trading.bean.dz.ExchangeApplyOrderDz" parameterType="map">
    <select id="getDzOrderList" resultType="com.yami.trading.bean.dz.dto.ExchangeApplyOrderDzDto" parameterType="map">
        SELECT
        *
        FROM t_exchange_apply_order_dz
        t.*,s.stock_name
        FROM t_exchange_apply_order_dz t
        LEFT JOIN t_stock_dz s ON t.dz_id=s.uuid
        WHERE 1=1
        <if test="stockType != null and stockType != '' ">
            AND stock_type = #{stockType}
            AND s.stock_type = #{stockType}
        </if>
        <if test="state != null and state != ''">
            AND t.state = #{state}
        </if>
        <if test="userId != null and userId != '' ">
            AND party_id = #{userId}
        <if test="state == null">
            AND t.state != 'position'
        </if>
        ORDER BY  create_time DESC
        <if test="userId != null and userId != '' ">
            AND t.party_id = #{userId}
        </if>
        ORDER BY  t.create_time DESC
    </select>
    <select id="getDzCheckList" resultType="com.yami.trading.bean.dz.dto.ExchangeApplyOrderDzDto" parameterType="map">
        SELECT
        t.*,u.user_name,u.user_code,s.stock_type
        t.*,u.user_name,u.user_code,s.stock_name
        FROM t_exchange_apply_order_dz t
        LEFT JOIN tz_user u ON t.party_id = u.user_id
        LEFT JOIN t_stock_dz s ON s.uuid = t.dz_id