From 5fac4dc2409cbad940d2b2e66733ced2c8803339 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Mon, 29 Jun 2026 11:48:46 +0800
Subject: [PATCH] 止损追单逻辑(多仓/空仓对称): 触发 → 查询 → 计算 → 下单 清理:取消相邻网格旧挂单 + 取消最远止盈单 一句话总结:每次止损触发补回 quantity*2 张,但总持仓不超 maxPositionSize,也不再累加放大。

---
 src/main/java/com/xcong/excoin/utils/LogRecordUtils.java |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/utils/LogRecordUtils.java b/src/main/java/com/xcong/excoin/utils/LogRecordUtils.java
index 274b052..6bf4189 100644
--- a/src/main/java/com/xcong/excoin/utils/LogRecordUtils.java
+++ b/src/main/java/com/xcong/excoin/utils/LogRecordUtils.java
@@ -1,6 +1,8 @@
 package com.xcong.excoin.utils;
 
+import com.xcong.excoin.modules.coin.dao.MemberAccountFlowEntityDao;
 import com.xcong.excoin.modules.coin.dao.MemberAccountMoneyChangeDao;
+import com.xcong.excoin.modules.coin.entity.MemberAccountFlowEntity;
 import com.xcong.excoin.modules.coin.entity.MemberAccountMoneyChange;
 
 import java.math.BigDecimal;
@@ -23,4 +25,15 @@
         accountRecord.setType(type);
         SpringContextHolder.getBean(MemberAccountMoneyChangeDao.class).insert(accountRecord);
     }
+
+    public static void insertMemberAccountFlow(Long memberId, BigDecimal price, BigDecimal balance, String symbol, String source, String remark) {
+        MemberAccountFlowEntity memberAccountFlowEntity = new MemberAccountFlowEntity();
+        memberAccountFlowEntity.setMemberId(memberId);
+        memberAccountFlowEntity.setPrice(price);
+        memberAccountFlowEntity.setBalance(balance);
+        memberAccountFlowEntity.setSymbol(symbol);
+        memberAccountFlowEntity.setSource(source);
+        memberAccountFlowEntity.setRemark(remark);
+        SpringContextHolder.getBean(MemberAccountFlowEntityDao.class).insert(memberAccountFlowEntity);
+    }
 }

--
Gitblit v1.9.1