From 3a35e98f09c9320f8e1586d091b1c80c6c505610 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Thu, 12 Mar 2026 16:41:04 +0800
Subject: [PATCH] 1
---
src/main/resources/mapper/UserPositionMapper.xml | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/UserPositionMapper.xml b/src/main/resources/mapper/UserPositionMapper.xml
index 4053f52..507576f 100644
--- a/src/main/resources/mapper/UserPositionMapper.xml
+++ b/src/main/resources/mapper/UserPositionMapper.xml
@@ -45,7 +45,7 @@
stock_gid, stock_spell, buy_order_id, buy_order_time, buy_order_price, sell_order_id,
sell_order_time, sell_order_price, profit_target_price, stop_target_price, order_direction,
order_num, order_lever, order_total_price, order_fee, order_spread, order_stay_fee,
- order_stay_days, profit_and_lose, all_profit_and_lose,is_lock,lock_msg,stock_plate,spread_rate_price,margin_add
+ order_stay_days, profit_and_lose, all_profit_and_lose,is_lock,lock_msg,stock_plate,spread_rate_price,margin_add,buy_order_id_index
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
@@ -549,6 +549,11 @@
WHERE sell_order_id is not null
</select>
+ <select id="CountPositionAllProfitAndLoseByUserId" resultType="decimal" parameterType="integer">
+ SELECT sum(all_profit_and_lose) FROM user_position
+ WHERE sell_order_id is not null and user_id = #{userId}
+ </select>
+
<delete id="deleteByUserId" parameterType="integer">
DELETE FROM user_position WHERE user_id = #{userId}
--
Gitblit v1.9.3