From 1f19b78818609bf6d0849f8e58b349132a800538 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Mon, 01 Jun 2026 17:08:49 +0800
Subject: [PATCH] 1

---
 src/main/resources/mapper/UserPositionMapper.xml |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/UserPositionMapper.xml b/src/main/resources/mapper/UserPositionMapper.xml
index 6a99a68..86e2306 100644
--- a/src/main/resources/mapper/UserPositionMapper.xml
+++ b/src/main/resources/mapper/UserPositionMapper.xml
@@ -465,7 +465,16 @@
     FROM user_position
     <where>
       user_id = #{uid}
-      <if test="state != null">
+      <if test="state == 1">
+        and sell_order_id is null and (status = 1 or status is null)
+      </if>
+      <if test="state == 2">
+        and status = 2
+      </if>
+      <if test="state == 0">
+        and status = 0
+      </if>
+      <if test="state != null and state != 0 and state != 1 and state != 2">
         and status = #{state, jdbcType=INTEGER}
       </if>
       <if test="stockCode != null and stockCode != '' ">

--
Gitblit v1.9.3