注册上次新增消息类型的反射信息,新增测试接口

This commit is contained in:
chuzhongzai 2026-01-23 21:04:31 +08:00
parent b500691008
commit 29f1532dea
2 changed files with 12 additions and 2 deletions

View File

@ -18,7 +18,7 @@ import org.springframework.context.annotation.Configuration;
SendResponse.class, Message.class, com.pengrad.telegrambot.model.User.class, SendResponse.class, Message.class, com.pengrad.telegrambot.model.User.class,
Chat.class, MessageEntity.class, Chat.class, MessageEntity.class,
AbstractMethodError.class, DeleteGalleryMessage.class, DownloadPostMessage.class, DownloadStatusMessage.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 { public class CustomBean {
@Bean @Bean

View File

@ -2,6 +2,7 @@ package com.lion.lionwebsite.Controller;
import com.lion.lionwebsite.Service.CollectService; import com.lion.lionwebsite.Service.CollectService;
import com.lion.lionwebsite.Service.GalleryManageService; import com.lion.lionwebsite.Service.GalleryManageService;
import com.lion.lionwebsite.Service.RemoteService;
import com.lion.lionwebsite.Service.UserServiceImpl; import com.lion.lionwebsite.Service.UserServiceImpl;
import com.lion.lionwebsite.Util.Response; import com.lion.lionwebsite.Util.Response;
import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
@ -21,10 +22,13 @@ public class GalleryManageController {
UserServiceImpl userService; 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.galleryManageService = galleryManageService;
this.collectService = collectService; this.collectService = collectService;
this.userService = userService; this.userService = userService;
this.remoteService = remoteService;
} }
@PostMapping("") @PostMapping("")
@ -39,6 +43,12 @@ public class GalleryManageController {
return galleryManageService.reconnect(); return galleryManageService.reconnect();
} }
@PostMapping("/test")
public String test(){
remoteService.checkAvailability();
return "";
}
@GetMapping("") @GetMapping("")
public String selectGallery(String param, String type, String AuthCode) { public String selectGallery(String param, String type, String AuthCode) {
int userId = userService.getUserId(AuthCode); //能调到这里的授权码对应用户不可能为空 int userId = userService.getUserId(AuthCode); //能调到这里的授权码对应用户不可能为空