Pu Zhibing
2024-10-22 b4b44f2021dbf083b7057fb7e192b72d08b4bf17
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserCarController.java
@@ -10,6 +10,7 @@
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.stream.Collectors;
/**
 * <p>
@@ -47,6 +48,13 @@
        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);
    }
}