From a9610be1adcf8e2bc57f265203d6f3eca2c8e50d Mon Sep 17 00:00:00 2001 From: zhangli <123879394@qq.com> Date: Wed, 30 Jul 2025 23:52:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E6=9D=A1=E4=BB=B6=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=BD=A6=E8=BE=86=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/sczx/car/controller/CarController.java | 2 +- src/main/java/com/sczx/car/service/impl/CarServiceImpl.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sczx/car/controller/CarController.java b/src/main/java/com/sczx/car/controller/CarController.java index 21b24d4..770c7f7 100644 --- a/src/main/java/com/sczx/car/controller/CarController.java +++ b/src/main/java/com/sczx/car/controller/CarController.java @@ -31,7 +31,7 @@ public class CarController { @ApiOperation(value = "根据查询条件查询车辆") - @GetMapping("/getCarByCarCondition") + @PostMapping("/getCarByCarCondition") public Result getCarByCarCondition(@RequestBody CarQueryConditionReq req){ return Result.ok(carService.getCarByCondition(req)); } diff --git a/src/main/java/com/sczx/car/service/impl/CarServiceImpl.java b/src/main/java/com/sczx/car/service/impl/CarServiceImpl.java index bf12e11..25c9e60 100644 --- a/src/main/java/com/sczx/car/service/impl/CarServiceImpl.java +++ b/src/main/java/com/sczx/car/service/impl/CarServiceImpl.java @@ -29,7 +29,9 @@ public class CarServiceImpl implements CarService { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(StringUtils.isNotBlank(req.getLicensePlate()),CarPO::getLicensePlate, req.getLicensePlate()) .eq(StringUtils.isNotBlank(req.getVin()),CarPO::getVin, req.getVin()) - .eq(Objects.nonNull(req.getCarId()),CarPO::getId, req.getCarId()).last(" limit 1"); + .eq(Objects.nonNull(req.getCarId()),CarPO::getId, req.getCarId()) + .eq(CarPO::getDelFlag, "0") + .last(" limit 1"); CarPO carPO = carRepo.getOne(queryWrapper); return CarConvert.INSTANCE.poToDto(carPO); }