Commit 2d9da75c authored by libin's avatar libin

Merge branch 'master' into master_member_level_feature

parents 0565fa9e 5387a812
...@@ -74,7 +74,8 @@ public class OrderRentVehicleController extends CommonBaseController { ...@@ -74,7 +74,8 @@ public class OrderRentVehicleController extends CommonBaseController {
bo.setAppUserDTO(userFeign.userDetailById(dto.getAppUserId()).getData()); bo.setAppUserDTO(userFeign.userDetailById(dto.getAppUserId()).getData());
bo.setCrtUser("-1"+ BaseContextHandler.getUserID()); bo.setCrtUser("-1"+ BaseContextHandler.getUserID());
bo.setUseType(null); //设置-1表示查询所有的车
bo.setUseType(-1);
orderRentVehicleService.createOrder(bo); orderRentVehicleService.createOrder(bo);
return ObjectRestResponse.succ(bo.getOrder()); return ObjectRestResponse.succ(bo.getOrder());
} }
......
...@@ -130,6 +130,9 @@ ...@@ -130,6 +130,9 @@
</foreach> </foreach>
</if> </if>
<if test="userId != null">
and b.user_id = #{userId}
</if>
<if test="status != null"> <if test="status != null">
and b.status = #{status} and b.status = #{status}
</if> </if>
......
...@@ -1249,6 +1249,11 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR ...@@ -1249,6 +1249,11 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
} }
public PageDataVO<Vehicle> searchUsableVehicle(RentVehicleBookDTO dto) { public PageDataVO<Vehicle> searchUsableVehicle(RentVehicleBookDTO dto) {
//设置-1表示查询所有的车 由于null json序列化不会赋值过来
if(-1 == dto.getUseType()) {
dto.setUseType(null);
}
Map<String, Object> params = BeanUtil.beanToMap(dto); Map<String, Object> params = BeanUtil.beanToMap(dto);
List<String> notBookedDates = Lists.newArrayList(); List<String> notBookedDates = Lists.newArrayList();
if (StringUtils.isNotBlank(dto.getBookEndDate()) && if (StringUtils.isNotBlank(dto.getBookEndDate()) &&
......
...@@ -685,7 +685,6 @@ ...@@ -685,7 +685,6 @@
<if test="useType != null"> <if test="useType != null">
and v.use_type = #{useType} and v.use_type = #{useType}
</if> </if>
and v.use_type = 1
and bc.is_del = 0 and bc.is_del = 0
and bc.is_show = 1 and bc.is_show = 1
</where> </where>
......
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