From 29f1532dea159c7c3d9bbb5dceb8fa86e0f5986d Mon Sep 17 00:00:00 2001 From: chuzhongzai Date: Fri, 23 Jan 2026 21:04:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E4=B8=8A=E6=AC=A1=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=B6=88=E6=81=AF=E7=B1=BB=E5=9E=8B=E7=9A=84=E5=8F=8D?= =?UTF-8?q?=E5=B0=84=E4=BF=A1=E6=81=AF=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lion/lionwebsite/Configuration/CustomBean.java | 2 +- .../Controller/GalleryManageController.java | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/lion/lionwebsite/Configuration/CustomBean.java b/src/main/java/com/lion/lionwebsite/Configuration/CustomBean.java index 84ae136..e7a3163 100644 --- a/src/main/java/com/lion/lionwebsite/Configuration/CustomBean.java +++ b/src/main/java/com/lion/lionwebsite/Configuration/CustomBean.java @@ -18,7 +18,7 @@ import org.springframework.context.annotation.Configuration; SendResponse.class, Message.class, com.pengrad.telegrambot.model.User.class, Chat.class, MessageEntity.class, AbstractMethodError.class, DeleteGalleryMessage.class, DownloadPostMessage.class, DownloadStatusMessage.class, - IdentityMessage.class, MaintainMessage.class, ResponseMessage.class, LinkPreviewOptions.class}) + IdentityMessage.class, MaintainMessage.class, ResponseMessage.class, AvailableCheckMessage.class, LinkPreviewOptions.class}) public class CustomBean { @Bean diff --git a/src/main/java/com/lion/lionwebsite/Controller/GalleryManageController.java b/src/main/java/com/lion/lionwebsite/Controller/GalleryManageController.java index 77752e3..eca9020 100644 --- a/src/main/java/com/lion/lionwebsite/Controller/GalleryManageController.java +++ b/src/main/java/com/lion/lionwebsite/Controller/GalleryManageController.java @@ -2,6 +2,7 @@ package com.lion.lionwebsite.Controller; import com.lion.lionwebsite.Service.CollectService; import com.lion.lionwebsite.Service.GalleryManageService; +import com.lion.lionwebsite.Service.RemoteService; import com.lion.lionwebsite.Service.UserServiceImpl; import com.lion.lionwebsite.Util.Response; import jakarta.servlet.http.HttpServletRequest; @@ -21,10 +22,13 @@ public class GalleryManageController { UserServiceImpl userService; - public GalleryManageController(GalleryManageService galleryManageService, CollectService collectService, UserServiceImpl userService) { + RemoteService remoteService; + + public GalleryManageController(GalleryManageService galleryManageService, CollectService collectService, UserServiceImpl userService, RemoteService remoteService) { this.galleryManageService = galleryManageService; this.collectService = collectService; this.userService = userService; + this.remoteService = remoteService; } @PostMapping("") @@ -39,6 +43,12 @@ public class GalleryManageController { return galleryManageService.reconnect(); } + @PostMapping("/test") + public String test(){ + remoteService.checkAvailability(); + return ""; + } + @GetMapping("") public String selectGallery(String param, String type, String AuthCode) { int userId = userService.getUserId(AuthCode); //能调到这里的授权码对应用户不可能为空