From 4c4782b57ff7ff71a1b9d54feacf636da1dcee0d Mon Sep 17 00:00:00 2001 From: zyh <50652658+zyh530@users.noreply.github.com> Date: Fri, 3 Oct 2025 11:08:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9C=A8QrProxyController=E4=B8=AD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89=E6=89=AB=E7=A0=81?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E7=9A=84=E8=AE=BE=E7=BD=AE=EF=BC=8C=E6=9B=B4?= =?UTF-8?q?=E6=96=B0GameInterfaceResponse=E4=BB=A5=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=AF=A5=E5=86=85=E5=AE=B9=EF=BC=8C=E5=A2=9E=E5=BC=BA=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/controller/link/QrProxyController.java | 2 ++ .../server/model/dto/link/GameInterfaceResponse.java | 11 +++++++++++ .../server/service/admin/SystemConfigService.java | 5 +++++ 3 files changed, 18 insertions(+) diff --git a/src/main/java/com/gameplatform/server/controller/link/QrProxyController.java b/src/main/java/com/gameplatform/server/controller/link/QrProxyController.java index f8657a2..6644176 100644 --- a/src/main/java/com/gameplatform/server/controller/link/QrProxyController.java +++ b/src/main/java/com/gameplatform/server/controller/link/QrProxyController.java @@ -274,6 +274,8 @@ public class QrProxyController { response.setEndRewardUrl(appBaseUrl + "/api/link/image/" + codeNo + "/end-reward.png"); // 设置用户进度显示格式(从系统配置读取) response.setProgressDisplayFormat(systemConfigService.getProgressDisplayFormat()); + // 设置自定义扫码内容(从系统配置读取) + response.setCustomScanContent(systemConfigService.getCustomScanContent()); log.info("游戏界面数据构建完成: codeNo={}, totalPoints={}", codeNo, response.getTotalPoints()); diff --git a/src/main/java/com/gameplatform/server/model/dto/link/GameInterfaceResponse.java b/src/main/java/com/gameplatform/server/model/dto/link/GameInterfaceResponse.java index 5a2a34e..87e3ddc 100644 --- a/src/main/java/com/gameplatform/server/model/dto/link/GameInterfaceResponse.java +++ b/src/main/java/com/gameplatform/server/model/dto/link/GameInterfaceResponse.java @@ -49,6 +49,9 @@ public class GameInterfaceResponse { @Schema(description = "用户端进度显示格式:percent 或 ratio", example = "percent") private String progressDisplayFormat; + + @Schema(description = "自定义扫码界面内容") + private String customScanContent; public String getProgressDisplayFormat() { return progressDisplayFormat; @@ -57,6 +60,14 @@ public class GameInterfaceResponse { public void setProgressDisplayFormat(String progressDisplayFormat) { this.progressDisplayFormat = progressDisplayFormat; } + + public String getCustomScanContent() { + return customScanContent; + } + + public void setCustomScanContent(String customScanContent) { + this.customScanContent = customScanContent; + } public String getCodeNo() { return codeNo; diff --git a/src/main/java/com/gameplatform/server/service/admin/SystemConfigService.java b/src/main/java/com/gameplatform/server/service/admin/SystemConfigService.java index c81fb80..9c83619 100644 --- a/src/main/java/com/gameplatform/server/service/admin/SystemConfigService.java +++ b/src/main/java/com/gameplatform/server/service/admin/SystemConfigService.java @@ -123,6 +123,11 @@ public class SystemConfigService { return getConfigValue("user.progress_display_format", "percent"); } + // 获取用户端自定义扫码内容 + public String getCustomScanContent() { + return getConfigValue("user.custom_scan_content", ""); + } + // 批量更新配置 public boolean updateConfigs(List configs) { if (configs == null || configs.isEmpty()) {