Commit 716df786 authored by 周健威's avatar 周健威

修改并发问题

parent 8edc1eae
...@@ -122,6 +122,12 @@ public class RentVehicleBookDTO extends PageParam { ...@@ -122,6 +122,12 @@ public class RentVehicleBookDTO extends PageParam {
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
Boolean yearNo4Where; Boolean yearNo4Where;
/**
* 是否需要价格必须
*/
@ApiModelProperty(hidden = true)
Boolean newPriceSign;
/** /**
* 是否根据预订记录(相交叉)查询 * 是否根据预订记录(相交叉)查询
* 原(大于预约结束时间,小于预约开始时间的预约记录) * 原(大于预约结束时间,小于预约开始时间的预约记录)
......
...@@ -180,6 +180,7 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements ...@@ -180,6 +180,7 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
rbd.setBookStartDateTime(dto.getStartDateTime()); rbd.setBookStartDateTime(dto.getStartDateTime());
rbd.setBookEndDateTime(dto.getEndDateTime()); rbd.setBookEndDateTime(dto.getEndDateTime());
rbd.setYearNo4Where(Boolean.TRUE); rbd.setYearNo4Where(Boolean.TRUE);
rbd.setNewPriceSign(Boolean.TRUE);
//查询可车辆信息 //查询可车辆信息
PageDataVO<UsableVeicleVO> pageDataVO = vehicleBiz.searchUsableVehicle(rbd); PageDataVO<UsableVeicleVO> pageDataVO = vehicleBiz.searchUsableVehicle(rbd);
if(CollUtil.isNotEmpty(pageDataVO.getData())) { if(CollUtil.isNotEmpty(pageDataVO.getData())) {
...@@ -265,6 +266,7 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements ...@@ -265,6 +266,7 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
rbd.setLimit(100); rbd.setLimit(100);
rbd.setPage(1); rbd.setPage(1);
rbd.setYearNo4Where(Boolean.TRUE); rbd.setYearNo4Where(Boolean.TRUE);
rbd.setNewPriceSign(Boolean.TRUE);
//查询可车辆信息 //查询可车辆信息
PageDataVO<UsableVeicleVO> pageDataVO = vehicleBiz.searchUsableVehicle(rbd); PageDataVO<UsableVeicleVO> pageDataVO = vehicleBiz.searchUsableVehicle(rbd);
......
...@@ -1159,8 +1159,11 @@ ...@@ -1159,8 +1159,11 @@
<!-- 包含 vbi: --> <!-- 包含 vbi: -->
<sql id="searchUsableSql"> <sql id="searchUsableSql">
from vehicle v from vehicle v
<if test=" newPriceSign !=null and newPriceSign == true">
left join vehicle_common_price_info vcpi on vcpi.vehicle_id = v.id
</if>
<if test=" yearMonthAndParam !=null "> <if test=" yearMonthAndParam !=null ">
left join ( left join
select select
vbi.vehicle, vbi.vehicle,
BIT_OR( BIT_OR(
...@@ -1195,6 +1198,9 @@ ...@@ -1195,6 +1198,9 @@
left join vehicle_cata vc on vm.id = vc.vehicle_model_id left join vehicle_cata vc on vm.id = vc.vehicle_model_id
</if> </if>
<where> <where>
<if test=" newPriceSign !=null and newPriceSign == true">
and vcpi.is_del is not null and vcpi.is_del = 0
</if>
<!-- 若需根据预定日期条件查询,针对换为位操作 --> <!-- 若需根据预定日期条件查询,针对换为位操作 -->
<!-- yearNo4Where 标识时间参数是否用于where条件 --> <!-- yearNo4Where 标识时间参数是否用于where条件 -->
<if test=" yearMonthAndParam !=null and yearMonthAndParam != null and yearNo4Where == null"> <if test=" yearMonthAndParam !=null and yearMonthAndParam != null and yearNo4Where == null">
......
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