From 14b83856903ebec3f5b87cc4b28d42d3a49a0212 Mon Sep 17 00:00:00 2001
From: zyy <zyy@email.com>
Date: Fri, 31 Oct 2025 15:29:29 +0800
Subject: [PATCH] 借贷
---
trading-order-service/src/main/resources/mapper/dz/StockDzMapper.xml | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/trading-order-service/src/main/resources/mapper/dz/StockDzMapper.xml b/trading-order-service/src/main/resources/mapper/dz/StockDzMapper.xml
index 7fafa96..79a66ee 100644
--- a/trading-order-service/src/main/resources/mapper/dz/StockDzMapper.xml
+++ b/trading-order-service/src/main/resources/mapper/dz/StockDzMapper.xml
@@ -15,7 +15,10 @@
</if>
<if test="keyWords != null and keyWords != '' ">
- AND (stock_spell LIKE #{keyWords} OR stock_name LIKE #{keyWords})
+ AND (
+ stock_spell LIKE CONCAT('%', #{keyWords}, '%')
+ OR stock_name LIKE CONCAT('%', #{keyWords}, '%')
+ )
</if>
<if test="orderBy != null">
@@ -38,14 +41,17 @@
AND stock_type = #{stockType}
</if>
<if test="keyWords != null and keyWords != '' ">
- AND (stock_code LIKE #{keyWords} OR stock_name LIKE #{keyWords})
+ AND (
+ stock_code LIKE CONCAT('%', #{keyWords}, '%')
+ OR stock_name LIKE CONCAT('%', #{keyWords}, '%')
+ )
</if>
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
- t.*
+ 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
@@ -54,6 +60,9 @@
</if>
<if test="state != null and state != ''">
AND t.state = #{state}
+ </if>
+ <if test="state == null">
+ AND t.state != 'position'
</if>
<if test="userId != null and userId != '' ">
AND t.party_id = #{userId}
@@ -72,7 +81,7 @@
AND t.state = #{state}
</if>
<if test="stockCode != null and stockCode != '' ">
- AND t.symbol = #{stockCode}
+ AND t.symbol LIKE CONCAT('%', #{stockCode}, '%')
</if>
<if test="stockType != null and stockType != '' ">
AND s.stock_type = #{stockType}
--
Gitblit v1.9.3