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

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

diff --git a/src/main/java/com/xcong/excoin/configurations/WebMvcConfig.java b/src/main/java/com/xcong/excoin/configurations/WebMvcConfig.java
index ae63e6d..06994e0 100644
--- a/src/main/java/com/xcong/excoin/configurations/WebMvcConfig.java
+++ b/src/main/java/com/xcong/excoin/configurations/WebMvcConfig.java
@@ -1,5 +1,8 @@
 package com.xcong.excoin.configurations;
 
+import com.aliyun.oss.OSS;
+import com.aliyun.oss.OSSClientBuilder;
+import com.xcong.excoin.configurations.properties.AliOssProperties;
 import com.xcong.excoin.configurations.security.UserAuthenticationArgumentResolver;
 import com.xcong.excoin.utils.SpringContextHolder;
 import lombok.extern.slf4j.Slf4j;
@@ -10,6 +13,7 @@
 import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
+import javax.annotation.Resource;
 import java.util.List;
 
 /**
@@ -19,6 +23,10 @@
 @SpringBootConfiguration
 @Slf4j
 public class WebMvcConfig implements WebMvcConfigurer {
+
+    @Resource
+    private AliOssProperties aliOssProperties;
+
 
     @Override
     public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
@@ -38,6 +46,11 @@
                 .allowCredentials(true).maxAge(3600);
     }
 
+    @Bean
+    public OSS ossClient() {
+        return new OSSClientBuilder().build(aliOssProperties.getEndPoint(), aliOssProperties.getAccessKeyId(), aliOssProperties.getAccessKeySecret());
+    }
+
 //    @Bean
 //    public SpringContextHolder springContextHolder() {
 //        return new SpringContextHolder();

--
Gitblit v1.9.1