Commit 134ef7b9 authored by unset's avatar unset

修改车辆节假日价格信息

parent a5af6fe1
package com.xxfc.platform.vehicle.rest;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.vehicle.biz.VehicleBiz;
import com.xxfc.platform.vehicle.biz.VehicleHolidayPriceInfoBiz;
import com.xxfc.platform.vehicle.entity.Vehicle;
import com.xxfc.platform.vehicle.entity.VehicleHolidayPriceInfo;
import com.xxfc.platform.vehicle.pojo.dto.VehicleModelCalendarPriceDTO;
import com.xxfc.platform.vehicle.pojo.vo.VehicleVO;
......@@ -53,18 +50,18 @@ public class VehicleHolidayPriceInfoController extends BaseController<VehicleHol
Integer userId = Integer.valueOf(getCurrentUserId());
List<VehicleVO> vehicleVOS = CollUtil.newArrayList();
if(StrUtil.isNotBlank(vehicleIds)) {
String[] strs = StrUtil.split(vehicleIds, ",");
List<Vehicle> vehicleList = vehicleBiz.selectByWeekend(w -> {
w.andIn(Vehicle::getId, CollUtil.toList(strs));
return w;
});
for (Vehicle vehicle : vehicleList) {
VehicleVO vehicleVO = BeanUtil.toBean(vehicle, VehicleVO.class);
vehicleVO.setPriceDTOS(baseBiz.getSynthesizePrice(vehicle.getId(), startDate, endDate, userId, companyId));
vehicleVOS.add(vehicleVO);
}
}
// if(StrUtil.isNotBlank(vehicleIds)) {
// String[] strs = StrUtil.split(vehicleIds, ",");
// List<Vehicle> vehicleList = vehicleBiz.selectByWeekend(w -> {
// w.andIn(Vehicle::getId, CollUtil.toList(strs));
// return w;
// });
// for (Vehicle vehicle : vehicleList) {
// VehicleVO vehicleVO = BeanUtil.toBean(vehicle, VehicleVO.class);
// vehicleVO.setPriceDTOS(baseBiz.getSynthesizePrice(vehicle.getId(), startDate, endDate, userId, companyId));
// vehicleVOS.add(vehicleVO);
// }
// }
return ObjectRestResponse.succ(vehicleVOS);
}
......
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