From 95a52a6087a7587c89253c099f3d76213f8318ab Mon Sep 17 00:00:00 2001
From: dd <gitluke@outlook.com>
Date: Wed, 28 Jan 2026 23:03:52 +0800
Subject: [PATCH] 1
---
src/main/resources/mapper/UserPositionMapper.xml | 25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/main/resources/mapper/UserPositionMapper.xml b/src/main/resources/mapper/UserPositionMapper.xml
index a052158..a1bc94d 100644
--- a/src/main/resources/mapper/UserPositionMapper.xml
+++ b/src/main/resources/mapper/UserPositionMapper.xml
@@ -384,9 +384,9 @@
<if test="stockSpell != null and stockSpell != '' ">
and stock_spell like CONCAT('%','${stockSpell}','%')
</if>
-<!-- <if test="stockType != null and stockType!= ''">-->
-<!-- and stock_gid = #{stockType}-->
-<!-- </if>-->
+ <if test="stockType != null and stockType!= ''">
+ and stock_gid = #{stockType}
+ </if>
and position_type != 1
</where>
ORDER BY id DESC
@@ -547,6 +547,14 @@
FROM user_position
WHERE
user_id = #{uid}
+ <if test="state != null ">
+ <if test="state == 0">
+ and sell_order_id is null
+ </if>
+ <if test="state == 1">
+ and sell_order_id is not null
+ </if>
+ </if>
UNION ALL
SELECT
p.id,
@@ -599,14 +607,6 @@
</if>
) a
WHERE a.position_type != 1
- <if test="state != null ">
- <if test="state == 0">
- and a.sell_order_id is null
- </if>
- <if test="state == 1">
- and a.sell_order_id is not null
- </if>
- </if>
<if test="stockCode != null and stockCode != '' ">
and a.stock_code like CONCAT('%','${stockCode}','%')
</if>
@@ -616,6 +616,9 @@
<if test="positionType != null">
and a.position_type = #{positionType}
</if>
+ <if test="stockType != null and stockType != '' ">
+ and a.stock_gid = #{stockType}
+ </if>
ORDER BY a.buy_order_time DESC
</select>
--
Gitblit v1.9.3