feat: 增强二维码和图片代理功能

主要修改:
1. 在QrProxyController中新增多个图片代理接口,包括首页、首次赏金、中途赏金和结束赏金图片的获取。
2. 更新LinkController中的链接状态查询逻辑,简化日志输出。
3. 在LinkStatusService中优化链接状态处理逻辑,增加对USING状态的过期检查。
4. 在ScriptClient中新增通用图片获取方法,支持从脚本端获取图片数据。
5. 更新SecurityConfig,允许公开访问二维码和游戏界面数据接口。

技术细节:
- 新增GameInterfaceResponse DTO以支持游戏界面数据的返回格式。
- 通过脚本端接口实现图片的动态获取和链接状态的自动刷新。
This commit is contained in:
zyh
2025-08-26 23:11:01 +08:00
parent 400d6757c8
commit bb4136b4ab
10 changed files with 478 additions and 217 deletions

View File

@@ -44,6 +44,8 @@ public class SecurityConfig {
.pathMatchers(HttpMethod.GET, "/api/link/status").permitAll() // 用户端获取链接状态接口,公开访问
.pathMatchers(HttpMethod.POST, "/api/link/select-region").permitAll() // 用户端选区接口,公开访问
.pathMatchers(HttpMethod.GET, "/api/link/poll-login").permitAll() // 用户端轮询登录接口,公开访问
.pathMatchers(HttpMethod.GET, "/api/link/qr/**").permitAll() // 二维码获取接口,公开访问
.pathMatchers(HttpMethod.GET, "/api/link/*/game-interface").permitAll() // 游戏界面数据接口,公开访问
.pathMatchers("/api/link/**").authenticated() // 其他链接接口需要认证
.anyExchange().permitAll() // 其他接口后续再收紧
)
@@ -65,6 +67,8 @@ public class SecurityConfig {
log.info(" * GET /api/link/status -> 允许所有 (用户端公开接口)");
log.info(" * POST /api/link/select-region -> 允许所有 (用户端公开接口)");
log.info(" * GET /api/link/poll-login -> 允许所有 (用户端公开接口)");
log.info(" * GET /api/link/qr/** -> 允许所有 (二维码获取接口)");
log.info(" * GET /api/link/*/game-interface -> 允许所有 (游戏界面数据接口)");
log.info(" * /api/link/** -> 需要认证");
log.info(" * 其他路径 -> 允许所有");