You've already forked FrameTour-BE
refactor(scenic): 重构景区配置响应结构
- 移除了过时的配置字段,如预约流程、强制完成时间等 - 调整了字段顺序并添加分类注释(基础配置、功能开关、提示文案) -保留并优化核心配置项,如水印URL、防录屏类型等 - 清理了未使用的导入包和冗余代码 - 统一了优惠券开关字段,移除重复定义
This commit is contained in:
@@ -72,29 +72,14 @@ public class AppScenicController {
|
|||||||
public ApiResponse<ScenicConfigResp> getConfig(@PathVariable Long id){
|
public ApiResponse<ScenicConfigResp> getConfig(@PathVariable Long id){
|
||||||
ScenicConfigManager scenicConfig = scenicRepository.getScenicConfigManager(id);
|
ScenicConfigManager scenicConfig = scenicRepository.getScenicConfigManager(id);
|
||||||
ScenicConfigResp resp = new ScenicConfigResp();
|
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.setWatermarkUrl(scenicConfig.getString("watermark_url"));
|
||||||
resp.setShareEnable(scenicConfig.getBoolean("share_enable", true));
|
resp.setVideoStoreDay(scenicConfig.getInteger("video_store_day"));
|
||||||
resp.setShareBeforeBuy(scenicConfig.getBoolean("share_before_buy", true));
|
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);
|
return ApiResponse.success(resp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,16 +1,7 @@
|
|||||||
package com.ycwl.basic.model.pc.scenic.resp;
|
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 lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author:longbinbin
|
* @Author:longbinbin
|
||||||
* @Date:2024/12/2 10:53
|
* @Date:2024/12/2 10:53
|
||||||
@@ -19,37 +10,49 @@ import java.util.Date;
|
|||||||
@Data
|
@Data
|
||||||
public class ScenicConfigResp {
|
public class ScenicConfigResp {
|
||||||
|
|
||||||
|
// ========== 基础配置 ==========
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预约流程,1-预约,2-在线,3-全部
|
* 水印URL
|
||||||
*/
|
*/
|
||||||
private Integer bookRoutine;
|
private String watermarkUrl;
|
||||||
private Integer forceFinishTime;
|
|
||||||
private Integer tourTime;
|
|
||||||
/**
|
/**
|
||||||
* 样本保存时间
|
* 视频存储天数
|
||||||
*/
|
|
||||||
private Integer sampleStoreDay;
|
|
||||||
private Integer faceStoreDay;
|
|
||||||
/**
|
|
||||||
* 视频保存时间
|
|
||||||
*/
|
*/
|
||||||
private Integer videoStoreDay;
|
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 groupingEnable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优惠券功能开关
|
||||||
|
*/
|
||||||
|
private Boolean voucherEnable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 等待时显示照片开关
|
||||||
|
*/
|
||||||
private Boolean showPhotoWhenWaiting;
|
private Boolean showPhotoWhenWaiting;
|
||||||
private String watermarkUrl;
|
|
||||||
private Boolean shareEnable;
|
// ========== 提示文案 ==========
|
||||||
private Boolean shareBeforeBuy;
|
|
||||||
|
/**
|
||||||
|
* 图片素材包提示文案
|
||||||
|
*/
|
||||||
|
private String imageSourcePackHint = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频素材包提示文案
|
||||||
|
*/
|
||||||
|
private String videoSourcePackHint = "";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user