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/configurations/security/TokenFilter.java | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/configurations/security/TokenFilter.java b/src/main/java/com/xcong/excoin/configurations/security/TokenFilter.java
index 88058ec..362eb8b 100644
--- a/src/main/java/com/xcong/excoin/configurations/security/TokenFilter.java
+++ b/src/main/java/com/xcong/excoin/configurations/security/TokenFilter.java
@@ -65,13 +65,13 @@
MemberEntity loginUser = JSONObject.parseObject(loginStr, MemberEntity.class);
Authentication authentication = new UsernamePasswordAuthenticationToken(loginUser, token, new ArrayList<>());
SecurityContextHolder.getContext().setAuthentication(authentication);
- redisUtils.expire(redisKey, 300000);
+ redisUtils.expire(redisKey, 36000);
} else {
log.info("token无法查询:{}", token);
SecurityContextHolder.clearContext();
}
} else {
- log.info("token为空:{}", request.getRequestURI());
+// log.info("token为空:{}", request.getRequestURI());
SecurityContextHolder.clearContext();
}
} else {
@@ -99,12 +99,12 @@
if (verifyTokenExpired(Long.parseLong(tokens[1]))) {
return tokens[0];
} else {
- log.info("前面token为{}", tokens[0]);
- log.info("时间为:{}, 当前时间为:{}", tokens[1], System.currentTimeMillis());
+// log.info("前面token为{}", tokens[0]);
+// log.info("时间为:{}, 当前时间为:{}", tokens[1], System.currentTimeMillis());
return AppContants.TIME_OUT;
}
}
- log.info("bearerToken---->{}", bearerToken);
+// log.info("bearerToken---->{}", bearerToken);
} catch (Exception e) {
log.error("#解析token异常#", e);
return null;
@@ -116,7 +116,7 @@
boolean isDebug = applicationProperties.isDebug();
if (!isDebug) {
long currentTime = System.currentTimeMillis();
- return currentTime - time <= 5000;
+ return currentTime - time <= 10000;
}
return true;
}
--
Gitblit v1.9.1