From 1837824a37c1a9e6c77280862abed282e7ca61b9 Mon Sep 17 00:00:00 2001
From: Xiajijian <1176061145@qq.com>
Date: Wed, 24 Dec 2025 13:51:09 +0800
Subject: [PATCH] 1. 开始航线增肌航线id用于判断是否是单次执行航线业务。 2. 增加判断无人机,禁飞区逻辑。

---
 ard-framework/src/main/java/com/ard/framework/security/handle/CustomAuthenticationSuccessHandler.java |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/ard-framework/src/main/java/com/ard/framework/security/handle/CustomAuthenticationSuccessHandler.java b/ard-framework/src/main/java/com/ard/framework/security/handle/CustomAuthenticationSuccessHandler.java
index 5733a29..a660bda 100644
--- a/ard-framework/src/main/java/com/ard/framework/security/handle/CustomAuthenticationSuccessHandler.java
+++ b/ard-framework/src/main/java/com/ard/framework/security/handle/CustomAuthenticationSuccessHandler.java
@@ -4,15 +4,23 @@
 import com.ard.common.constant.Constants;
 import com.ard.common.core.redis.RedisCache;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
 
 @Component
 public class CustomAuthenticationSuccessHandler {
 
+    @Value("${token.soloLogin}")
+    private boolean soloLogin;
+
     @Autowired
     private RedisCache redisCache;
 
     public void onAuthenticationSuccess(Long userId) {
+        // 允许多端登录,直接放行
+        if (soloLogin) {
+            return;
+        }
         // 检查 Redis 中是否已有该用户登录
         String key = CacheConstants.LOGIN_USERID_KEY + userId;
         if (redisCache.hasKey(key)) {

--
Gitblit v1.9.3