Commit 5c4a3b11 authored by unset's avatar unset

Merge branch 'master-vehicle-price' into dev-tiande

parents 1141ccff a3db44da
......@@ -19,4 +19,6 @@ public class VehicleHolidayPriceInfoVo {
private Integer rentFreeDay;
private String vehicleId;
}
......@@ -228,8 +228,8 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM
}
public ObjectRestResponse getAll(Integer festivalId) {
return ObjectRestResponse.succ(mapper.getAll(festivalId));
public ObjectRestResponse getAll(String vehicleId, Integer festivalId) {
return ObjectRestResponse.succ(mapper.getAll(vehicleId, festivalId));
}
......
......@@ -14,5 +14,5 @@ import java.util.List;
* @date 2020-05-11 09:16:23
*/
public interface VehicleHolidayPriceInfoMapper extends Mapper<VehicleHolidayPriceInfo> {
List<VehicleHolidayPriceInfoVo> getAll(Integer festivalId);
List<VehicleHolidayPriceInfoVo> getAll(String vehicleId, Integer festivalId);
}
......@@ -76,8 +76,8 @@ public class VehicleHolidayPriceInfoController extends BaseController<VehicleHol
}
@GetMapping(value = "getAll")
public ObjectRestResponse getAll(Integer festivalId) {
return baseBiz.getAll(festivalId);
public ObjectRestResponse getAll(String vehicleId, Integer festivalId) {
return baseBiz.getAll(vehicleId, festivalId);
}
}
\ No newline at end of file
......@@ -4,10 +4,11 @@
<mapper namespace="com.xxfc.platform.vehicle.mapper.VehicleHolidayPriceInfoMapper">
<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 from vehicle_holiday_price_info
GROUP BY festival_id,festival_day,rent_price, rent_free_day
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
HAVING vehicle_id = #{vehicleId}
<if test="festivalId != null">
HAVING festival_id = #{festivalId}
and festival_id = #{festivalId}
</if>
</select>
......
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