Commit e5cb6e94 authored by unset's avatar unset

修改车辆节假日价格信息

parent dd19d119
...@@ -14,6 +14,7 @@ import com.xxfc.platform.vehicle.entity.VehicleCommonPriceInfo; ...@@ -14,6 +14,7 @@ import com.xxfc.platform.vehicle.entity.VehicleCommonPriceInfo;
import com.xxfc.platform.vehicle.entity.VehicleHolidayPriceInfo; import com.xxfc.platform.vehicle.entity.VehicleHolidayPriceInfo;
import com.xxfc.platform.vehicle.mapper.VehicleHolidayPriceInfoMapper; import com.xxfc.platform.vehicle.mapper.VehicleHolidayPriceInfoMapper;
import com.xxfc.platform.vehicle.pojo.dto.VehicleModelCalendarPriceDTO; import com.xxfc.platform.vehicle.pojo.dto.VehicleModelCalendarPriceDTO;
import com.xxfc.platform.vehicle.pojo.vo.VehicleHolidayPriceInfoVo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormat;
...@@ -234,7 +235,15 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM ...@@ -234,7 +235,15 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM
public ObjectRestResponse getAll(String vehicleId, Integer festivalId) { public ObjectRestResponse getAll(String vehicleId, Integer festivalId) {
return ObjectRestResponse.succ(mapper.getAll(vehicleId, festivalId)); List<VehicleHolidayPriceInfoVo> list = mapper.getAll(vehicleId, festivalId);
if (list != null && list.size() > 0) {
list.parallelStream().forEach(vehicleHolidayPriceInfoVo -> {
VehicleHolidayPriceInfo vehicleHolidayPriceInfo = getByVehicleId(vehicleHolidayPriceInfoVo.getVehicleId(), vehicleHolidayPriceInfoVo.getStartTime());
vehicleHolidayPriceInfoVo.setAllModelUse(vehicleHolidayPriceInfo.getAllModelUse());
vehicleHolidayPriceInfoVo.setAllVehicleUse(vehicleHolidayPriceInfo.getAllVehicleUse());
});
}
return ObjectRestResponse.succ();
} }
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<mapper namespace="com.xxfc.platform.vehicle.mapper.VehicleHolidayPriceInfoMapper"> <mapper namespace="com.xxfc.platform.vehicle.mapper.VehicleHolidayPriceInfoMapper">
<select id="getAll" resultType="com.xxfc.platform.vehicle.pojo.vo.VehicleHolidayPriceInfoVo"> <select id="getAll" resultType="com.xxfc.platform.vehicle.pojo.vo.VehicleHolidayPriceInfoVo">
select festival_id, festival_day, MIN(festival_date) as startTime, MAX(festival_date) as endTime, rent_price, rent_free_day,vehicle_id, all_model_use, all_vehicle_use from vehicle_holiday_price_info select festival_id, festival_day, MIN(festival_date) as startTime, MAX(festival_date) as endTime, rent_price, rent_free_day,vehicle_id from vehicle_holiday_price_info
GROUP BY festival_id,festival_day,rent_price, rent_free_day,vehicle_id, all_model_use, all_vehicle_use GROUP BY festival_id,festival_day,rent_price, rent_free_day,vehicle_id
HAVING vehicle_id = #{vehicleId} HAVING vehicle_id = #{vehicleId}
<if test="festivalId != null"> <if test="festivalId != null">
and festival_id = #{festivalId} and festival_id = #{festivalId}
......
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