Commit 78d634d6 authored by libin's avatar libin

价格日历设置

parent 1e51e0c9
......@@ -71,7 +71,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
* @param userId
*/
public void addVehicleModelCalendarPrice(List<VehicleModelCalendarPriceSaveDTO> vehicleModelCalendarPrices, String date,Integer userId) {
if (CollectionUtils.isNotEmpty(vehicleModelCalendarPrices)) {
vehicleModelCalendarPrices = vehicleModelCalendarPrices==null?Collections.EMPTY_LIST:vehicleModelCalendarPrices;
List<VehicleModelCalendarPrice> vehicleModelCalendarPriceList = new ArrayList<>();
List<Date> dateList = vehicleModelCalendarPrices.stream().peek(x -> {
VehicleModelCalendarPrice calendarPrice = new VehicleModelCalendarPrice();
......@@ -101,10 +101,9 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
mapper.updateByExampleSelective(vehicleModelCalendarPrice, example);
//2.插入新的数据
if (!CollectionUtils.isNotEmpty(dateList)){
if (CollectionUtils.isNotEmpty(dateList)) {
mapper.insertList(vehicleModelCalendarPriceList);
}
}
}
......
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