| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | public R<List<TAppUserCar>> getCarByIds(@RequestBody List<Long> carIds){ |
| | | return R.ok(appUserCarService.list(Wrappers.lambdaQuery(TAppUserCar.class).in(TAppUserCar::getId,carIds))); |
| | | } |
| | | |
| | | @PostMapping(value = "/t-app-user-car/getCarById/{id}") |
| | | public R<TAppUserCar> getCarById(@PathVariable("id")String id){ |
| | | return R.ok(appUserCarService.lambdaQuery().eq(TAppUserCar::getId,id).one()); |
| | | } |
| | | |
| | | /** |
| | | * 根据车牌号查询数据 |
| | |
| | | TAppUserCar one = appUserCarService.getOne(new LambdaQueryWrapper<TAppUserCar>().eq(TAppUserCar::getLicensePlate, licensePlate).eq(TAppUserCar::getDelFlag, 0)); |
| | | return R.ok(one); |
| | | } |
| | | @PostMapping(value = "/t-app-user-car/getAppUserCarByLicensePlates") |
| | | public R<List<Long>> getAppUserCarByLicensePlates(@RequestParam("licensePlate") String licensePlate){ |
| | | List<Long> collect = appUserCarService.list(new LambdaQueryWrapper<TAppUserCar>().like(TAppUserCar::getLicensePlate, licensePlate) |
| | | .eq(TAppUserCar::getDelFlag, 0)).stream() |
| | | .map(TAppUserCar::getId).collect(Collectors.toList()); |
| | | return R.ok(collect); |
| | | } |
| | | |
| | | } |
| | | |