From fe8068b3d95aa63cc524933dbc7487cdd2c5c730 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Fri, 10 Oct 2025 13:46:59 +0800 Subject: [PATCH] =?UTF-8?q?refactor(scenic):=20=E9=87=8D=E6=9E=84=E6=99=AF?= =?UTF-8?q?=E5=8C=BA=E9=85=8D=E7=BD=AE=E5=93=8D=E5=BA=94=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了过时的配置字段,如预约流程、强制完成时间等 - 调整了字段顺序并添加分类注释(基础配置、功能开关、提示文案) -保留并优化核心配置项,如水印URL、防录屏类型等 - 清理了未使用的导入包和冗余代码 - 统一了优惠券开关字段,移除重复定义 --- .../mobile/AppScenicController.java | 29 ++------ .../pc/scenic/resp/ScenicConfigResp.java | 71 ++++++++++--------- 2 files changed, 44 insertions(+), 56 deletions(-) diff --git a/src/main/java/com/ycwl/basic/controller/mobile/AppScenicController.java b/src/main/java/com/ycwl/basic/controller/mobile/AppScenicController.java index 6008fe61..59e61100 100644 --- a/src/main/java/com/ycwl/basic/controller/mobile/AppScenicController.java +++ b/src/main/java/com/ycwl/basic/controller/mobile/AppScenicController.java @@ -72,29 +72,14 @@ public class AppScenicController { public ApiResponse getConfig(@PathVariable Long id){ ScenicConfigManager scenicConfig = scenicRepository.getScenicConfigManager(id); ScenicConfigResp resp = new ScenicConfigResp(); - resp.setBookRoutine(scenicConfig.getInteger("book_routine")); - resp.setForceFinishTime(scenicConfig.getInteger("force_finish_time")); - resp.setTourTime(scenicConfig.getInteger("tour_time")); - resp.setSampleStoreDay(scenicConfig.getInteger("sample_store_day")); - resp.setFaceStoreDay(scenicConfig.getInteger("face_store_day")); - resp.setVideoStoreDay(scenicConfig.getInteger("video_store_day")); - resp.setAllFree(scenicConfig.getBoolean("all_free")); - resp.setDisableSourceVideo(scenicConfig.getBoolean("disable_source_video")); - resp.setDisableSourceImage(scenicConfig.getBoolean("disable_source_image")); - resp.setAntiScreenRecordType(scenicConfig.getInteger("anti_screen_record_type")); - resp.setVideoSourceStoreDay(scenicConfig.getInteger("video_source_store_day")); - resp.setImageSourceStoreDay(scenicConfig.getInteger("image_source_store_day")); - resp.setUserSourceExpireDay(scenicConfig.getInteger("user_source_expire_day")); - resp.setBrokerDirectRate(scenicConfig.getBigDecimal("broker_direct_rate")); - resp.setVideoSourcePackHint(scenicConfig.getString("video_source_pack_hint")); - resp.setImageSourcePackHint(scenicConfig.getString("image_source_pack_hint")); - resp.setVoucherEnable(scenicConfig.getBoolean("voucher_enable", false)); - resp.setEnableVoucher(scenicConfig.getBoolean("voucher_enable", false)); // compactible - resp.setGroupingEnable(scenicConfig.getBoolean("grouping_enable", false)); - resp.setShowPhotoWhenWaiting(scenicConfig.getBoolean("show_photo_when_waiting", false)); resp.setWatermarkUrl(scenicConfig.getString("watermark_url")); - resp.setShareEnable(scenicConfig.getBoolean("share_enable", true)); - resp.setShareBeforeBuy(scenicConfig.getBoolean("share_before_buy", true)); + resp.setVideoStoreDay(scenicConfig.getInteger("video_store_day")); + resp.setAntiScreenRecordType(scenicConfig.getInteger("anti_screen_record_type")); + resp.setGroupingEnable(scenicConfig.getBoolean("grouping_enable", false)); + resp.setVoucherEnable(scenicConfig.getBoolean("voucher_enable", false)); + resp.setShowPhotoWhenWaiting(scenicConfig.getBoolean("show_photo_when_waiting", false)); + resp.setImageSourcePackHint(scenicConfig.getString("image_source_pack_hint")); + resp.setVideoSourcePackHint(scenicConfig.getString("video_source_pack_hint")); return ApiResponse.success(resp); } diff --git a/src/main/java/com/ycwl/basic/model/pc/scenic/resp/ScenicConfigResp.java b/src/main/java/com/ycwl/basic/model/pc/scenic/resp/ScenicConfigResp.java index 4cb0ecb8..351d7235 100644 --- a/src/main/java/com/ycwl/basic/model/pc/scenic/resp/ScenicConfigResp.java +++ b/src/main/java/com/ycwl/basic/model/pc/scenic/resp/ScenicConfigResp.java @@ -1,16 +1,7 @@ package com.ycwl.basic.model.pc.scenic.resp; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.ycwl.basic.facebody.enums.FaceBodyAdapterType; -import com.ycwl.basic.pay.enums.PayAdapterType; -import com.ycwl.basic.storage.enums.StorageType; import lombok.Data; -import java.math.BigDecimal; -import java.util.Date; - /** * @Author:longbinbin * @Date:2024/12/2 10:53 @@ -19,37 +10,49 @@ import java.util.Date; @Data public class ScenicConfigResp { + // ========== 基础配置 ========== + /** - * 预约流程,1-预约,2-在线,3-全部 + * 水印URL */ - private Integer bookRoutine; - private Integer forceFinishTime; - private Integer tourTime; + private String watermarkUrl; + /** - * 样本保存时间 - */ - private Integer sampleStoreDay; - private Integer faceStoreDay; - /** - * 视频保存时间 + * 视频存储天数 */ private Integer videoStoreDay; - private Boolean allFree; - private Boolean disableSourceVideo; - private Boolean disableSourceImage; - private Integer antiScreenRecordType; - private Integer videoSourceStoreDay; - private Integer imageSourceStoreDay; - private Integer userSourceExpireDay; - private BigDecimal brokerDirectRate; - private String imageSourcePackHint = ""; - private String videoSourcePackHint = ""; - private Boolean voucherEnable; - private Boolean enableVoucher; + /** + * 防录屏类型配置 + */ + private Integer antiScreenRecordType; + + // ========== 功能开关 ========== + + /** + * 分组功能开关 + */ private Boolean groupingEnable; + + /** + * 优惠券功能开关 + */ + private Boolean voucherEnable; + + /** + * 等待时显示照片开关 + */ private Boolean showPhotoWhenWaiting; - private String watermarkUrl; - private Boolean shareEnable; - private Boolean shareBeforeBuy; + + // ========== 提示文案 ========== + + /** + * 图片素材包提示文案 + */ + private String imageSourcePackHint = ""; + + /** + * 视频素材包提示文案 + */ + private String videoSourcePackHint = ""; }