From 495253345194da937f134cfb2adb9eaf00c413d5 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期日, 08 十月 2023 14:26:10 +0800
Subject: [PATCH] 修改令牌的IP检查功能

---
 src/main/java/com/moon/server/controller/sys/TokenController.java |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/moon/server/controller/sys/TokenController.java b/src/main/java/com/moon/server/controller/sys/TokenController.java
index 4f6f540..dfe7a27 100644
--- a/src/main/java/com/moon/server/controller/sys/TokenController.java
+++ b/src/main/java/com/moon/server/controller/sys/TokenController.java
@@ -79,7 +79,7 @@
     }
 
     @SysLog()
-    @ApiOperation(value = "鎻掑叆涓�鏉℃柊浠ょ墝")
+    @ApiOperation(value = "鍒涘缓鏂颁护鐗�")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "type", value = "浠ょ墝绫诲埆锛�0-涓存椂锛�1-鍥哄畾", dataType = "Integer", paramType = "query", example = "1"),
             @ApiImplicitParam(name = "min", value = "鍒嗛挓鏁帮細榛樿1涓湀", dataType = "Integer", paramType = "query", example = "43200")
@@ -94,7 +94,14 @@
                 min = SettingData.TOKEN_EXPIRE;
             }
 
-            return success(null);
+            UserEntity ue = tokenService.getCurrentUser(req);
+            TokenEntity te = tokenService.getNewToken(type, min, ue, req);
+            int rows = tokenService.insertToken(te);
+            if (0 == rows) {
+                return fail("鍒涘缓浠ょ墝澶辫触", null);
+            }
+
+            return success(te);
         } catch (Exception ex) {
             return fail(ex, null);
         }

--
Gitblit v1.9.3