refactor(basic): 将 ScenicConfigEntity 中的 allFree 字段类型从 Integer 改为 Boolean

- 修改了 OrderBiz、PriceBiz 中的相关代码,使用 Boolean.TRUE 进行比较
- 更新了 ScenicConfigEntity 和 ScenicConfigResp 中 allFree 字段的类型
- 在 ScenicRepository 中使用 ConfigValueUtil.getBooleanValue 方法获取 allFree 的值
This commit is contained in:
2025-08-26 14:29:45 +08:00
parent f0aeb27566
commit f6bd7e48a3
5 changed files with 5 additions and 5 deletions

View File

@@ -88,7 +88,7 @@ public class OrderBiz {
ScenicConfigEntity scenicConfig = scenicRepository.getScenicConfig(scenicId); ScenicConfigEntity scenicConfig = scenicRepository.getScenicConfig(scenicId);
priceObj.setScenicAllPrice(scenic.getPrice()); priceObj.setScenicAllPrice(scenic.getPrice());
if (scenicConfig != null) { if (scenicConfig != null) {
if (Integer.valueOf(1).equals(scenicConfig.getAllFree())) { if (Boolean.TRUE.equals(scenicConfig.getAllFree())) {
// 景区全免 // 景区全免
priceObj.setFree(true); priceObj.setFree(true);
priceObj.setPrice(BigDecimal.ZERO); priceObj.setPrice(BigDecimal.ZERO);

View File

@@ -92,7 +92,7 @@ public class PriceBiz {
} }
ScenicConfigEntity scenicConfig = scenicRepository.getScenicConfig(scenicId); ScenicConfigEntity scenicConfig = scenicRepository.getScenicConfig(scenicId);
if (scenicConfig != null) { if (scenicConfig != null) {
if (Integer.valueOf(1).equals(scenicConfig.getAllFree())) { if (Boolean.TRUE.equals(scenicConfig.getAllFree())) {
// 景区全免 // 景区全免
respVO.setFree(true); respVO.setFree(true);
respVO.setSlashPrice(BigDecimal.ZERO); respVO.setSlashPrice(BigDecimal.ZERO);

View File

@@ -67,7 +67,7 @@ public class ScenicConfigEntity {
/** /**
* 是否开启全部免费 * 是否开启全部免费
*/ */
private Integer allFree; private Boolean allFree;
/** /**
* 是否禁用源视频 * 是否禁用源视频
* 0-否 1-是 * 0-否 1-是

View File

@@ -34,7 +34,7 @@ public class ScenicConfigResp {
* 视频保存时间 * 视频保存时间
*/ */
private Integer videoStoreDay; private Integer videoStoreDay;
private Integer allFree; private Boolean allFree;
private Boolean disableSourceVideo; private Boolean disableSourceVideo;
private Boolean disableSourceImage; private Boolean disableSourceImage;
private Integer antiScreenRecordType; private Integer antiScreenRecordType;

View File

@@ -164,7 +164,7 @@ public class ScenicRepository {
entity.setSampleStoreDay(ConfigValueUtil.getIntValue(config, "sampleStoreDay")); entity.setSampleStoreDay(ConfigValueUtil.getIntValue(config, "sampleStoreDay"));
entity.setFaceStoreDay(ConfigValueUtil.getIntValue(config, "faceStoreDay")); entity.setFaceStoreDay(ConfigValueUtil.getIntValue(config, "faceStoreDay"));
entity.setVideoStoreDay(ConfigValueUtil.getIntValue(config, "videoStoreDay")); entity.setVideoStoreDay(ConfigValueUtil.getIntValue(config, "videoStoreDay"));
entity.setAllFree(ConfigValueUtil.getIntValue(config, "allFree")); entity.setAllFree(ConfigValueUtil.getBooleanValue(config, "allFree"));
entity.setDisableSourceVideo(ConfigValueUtil.getBooleanValue(config, "disableSourceVideo")); entity.setDisableSourceVideo(ConfigValueUtil.getBooleanValue(config, "disableSourceVideo"));
entity.setDisableSourceImage(ConfigValueUtil.getBooleanValue(config, "disableSourceImage")); entity.setDisableSourceImage(ConfigValueUtil.getBooleanValue(config, "disableSourceImage"));
entity.setTemplateNewVideoType(ConfigValueUtil.getIntValue(config, "templateNewVideoType")); entity.setTemplateNewVideoType(ConfigValueUtil.getIntValue(config, "templateNewVideoType"));