From 7166584366406c107c3e46560580765f2db4cd5c Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Thu, 04 Jun 2026 10:21:17 +0800
Subject: [PATCH] 1

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

diff --git a/src/main/resources/mapper/UserPositionMapper.xml b/src/main/resources/mapper/UserPositionMapper.xml
index 86e2306..20db7a5 100644
--- a/src/main/resources/mapper/UserPositionMapper.xml
+++ b/src/main/resources/mapper/UserPositionMapper.xml
@@ -484,7 +484,14 @@
         and stock_spell like CONCAT('%','${stockSpell}','%')
       </if>
     </where>
-    ORDER BY id DESC
+    <choose>
+      <when test="state == 2">
+        ORDER BY sell_order_time DESC, id DESC
+      </when>
+      <otherwise>
+        ORDER BY id DESC
+      </otherwise>
+    </choose>
   </select>
 
   <select id="findPositionByUserIdAndSellIdIsNull" parameterType="integer" resultMap="BaseResultMap">

--
Gitblit v1.9.3