Commit 453488e7 authored by libin's avatar libin

日历价格

parent f335e317
......@@ -12,6 +12,7 @@ import com.xxfc.platform.vehicle.pojo.dto.VehicleModelDTO;
import com.xxfc.platform.vehicle.pojo.dto.VehicleModelHolidayPriceDTO;
import com.xxfc.platform.vehicle.pojo.vo.VehicleModelDayPriceVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -38,6 +39,7 @@ import java.util.stream.Collectors;
@Transactional(rollbackFor = Exception.class)
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
@Slf4j
public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPriceMapper, VehicleModelCalendarPrice> {
private static final int START_OF_WEEK = 1;
private static final int END_OF_WEEK = 7;
......@@ -313,6 +315,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
* @return
*/
public Map<String, Object> transfromPriceAndFreeDaysByDate(Map<Date, VehicleModelHolidayPriceDTO> festivalDayMap, Date current_date, BigDecimal vehicle_price, Integer discount) {
log.info("参数:【{}=={}=={}=={}】",festivalDayMap,current_date,vehicle_price,discount);
Map<String, Object> vehicle_price_days_map = new HashMap<>(3);
Integer free_days = DEFAULT_FREE_DAYS;
vehicle_price_days_map.put(BASE_PRICE_VAL,vehicle_price);
......@@ -326,6 +329,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
vehicle_price = vehicle_price.multiply(new BigDecimal(discount / 100.00));
vehicle_price_days_map.put(PRICE_VAL, vehicle_price);
vehicle_price_days_map.put(DAYS_VAL, free_days);
log.info("(节假日|非节假日未设置的)价格和免费天数 处理【{}】",vehicle_price_days_map);
return vehicle_price_days_map;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment