Commit e472cb19 authored by 周健威's avatar 周健威

修改查询bug

parent 77cc7730
......@@ -60,5 +60,5 @@ public interface VehicleMapper extends Mapper<Vehicle> {
List<Vehicle> getAllVehicleByParam(Map<String, Object> param);
List<VehicleBookRecord> incloudBookRecord(@Param("startDateExtend") String startDateExtend, @Param("endDateExtend") String endDateExtend);
List<VehicleBookRecord> incloudBookRecord(@Param("startDateExtend") String startDateExtend, @Param("endDateExtend") String endDateExtend, @Param("vehicleId") String vehicleId);
}
\ No newline at end of file
......@@ -188,7 +188,7 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
for (UsableVeicleVO usableVeicleVO : pageDataVO.getData()) {
//判断是否有被全包含
List<VehicleBookRecord> list = vehicleMapper.incloudBookRecord(rbd.getStartDateExtend(), rbd.getEndDateExtend());
List<VehicleBookRecord> list = vehicleMapper.incloudBookRecord(rbd.getStartDateExtend(), rbd.getEndDateExtend(), usableVeicleVO.getId());
if(list.size() > 0) {
Date startDate = DateUtil.offsetMinute(DateUtil.date(dto.getStartDateTamp()), 5);
......
......@@ -1146,6 +1146,9 @@
<if test="memberUse != null and memberUse>0">
and (v.member_use = 1 or v.member_use = #{memberUse})
</if>
<if test="vehicleId != null">
and v.id = #{vehicleId}
</if>
<if test="lon != null and lat != null">
order by
distance asc
......@@ -1302,6 +1305,9 @@
select *
from vehicle_book_record
where status != 4 and status != 6
<if test="vehicleId != null">
and vehicle_id = #{vehicleId}
</if>
and (
((actual_end_date is not null and actual_end_date &gt;= #{endDateExtend}) or (actual_end_date is null and book_end_date &gt;= #{endDateExtend}))
and
......
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