You've already forked FrameTour-BE
feat(order): 添加景区全免逻辑处理
- 引入ScenicConfigManager依赖 - 实现景区全免配置判断 - 设置全免订单价格为零 - 更新订单响应状态逻辑
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.ycwl.basic.biz;
|
||||
|
||||
import com.ycwl.basic.enums.StatisticEnum;
|
||||
import com.ycwl.basic.integration.common.manager.ScenicConfigManager;
|
||||
import com.ycwl.basic.mapper.OrderMapper;
|
||||
import com.ycwl.basic.mapper.SourceMapper;
|
||||
import com.ycwl.basic.mapper.StatisticsMapper;
|
||||
@@ -169,6 +170,14 @@ public class OrderBiz {
|
||||
respVO.setFree(false);
|
||||
return respVO;
|
||||
}
|
||||
ScenicConfigManager scenicConfig = scenicRepository.getScenicConfigManager(scenicId);
|
||||
if (Boolean.TRUE.equals(scenicConfig.getBoolean("all_free"))) {
|
||||
// 景区全免
|
||||
respVO.setFree(true);
|
||||
respVO.setOrigPrice(BigDecimal.ZERO);
|
||||
respVO.setSlashPrice(BigDecimal.ZERO);
|
||||
return respVO;
|
||||
}
|
||||
respVO.setBuy(false);
|
||||
return respVO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user