feat: 在QrProxyController中添加自定义扫码内容的设置,更新GameInterfaceResponse以支持该内容,增强用户体验
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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<SystemConfig> configs) {
|
||||
if (configs == null || configs.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user