ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserCarClient.java
@@ -35,6 +35,8 @@ * @param licensePlate * @return */ @PostMapping(value = "/t-app-user-car/getAppUserCarByLicensePlate") @PostMapping(value = "/t-app-user-car/t-app-user-car/getAppUserCarByLicensePlate") R<TAppUserCar> getAppUserCarByLicensePlate(@RequestParam("licensePlate") String licensePlate); @PostMapping(value = "/t-app-user-car/t-app-user-car/getAppUserCarByLicensePlates") R<List<Long>> getAppUserCarByLicensePlates(@RequestParam("licensePlate") String licensePlate); } 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); } } ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java
@@ -1410,7 +1410,36 @@ startTime2 = split[1]; } ChargingOrderTimeVO chargingOrderTimeVO = new ChargingOrderTimeVO(); if (StringUtils.hasLength(dto.getPhone())){ List<Long> data = appUserClient.getUserIdsByPhone(dto.getPhone()).getData(); if(data!=null){ if (!data.isEmpty()){ dto.setUserIds(data); } }else{ dto.setUserIds(new ArrayList<Long>()); } if (dto.getUserIds().isEmpty()){ List<Long> carIds = dto.getUserIds(); carIds.add(-1L); dto.setUserIds(carIds); } } if (StringUtils.hasLength(dto.getPhone())){ List<Long> data = appUserCarClient.getAppUserCarByLicensePlates(dto.getLicensePlate()).getData(); if(data!=null){ if (!data.isEmpty()){ dto.setCarIds(data); } }else{ dto.setCarIds(new ArrayList<Long>()); } if (dto.getCarIds().isEmpty()){ List<Long> carIds = dto.getCarIds(); carIds.add(-1L); dto.setCarIds(carIds); } } PageInfo<ChargingOrderListVO> pageInfo = new PageInfo<>(dto.getPageCurr(),dto.getPageSize()); List<ChargingOrderListVO> list = this.baseMapper.chargingList(pageInfo,dto,startTime1,startTime2,endTime1,endTime2); for (ChargingOrderListVO chargingOrderListVO : list) { ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/util/task/TaskUtil.java
@@ -48,6 +48,8 @@ // 每天凌晨12点执行的定时任务 @Scheduled(cron = "0 0 12 2 * ?") // 每30秒执行一次的定时任务 @Scheduled(cron = "0/30 * * * * ?") public void taskMonth() { try { // 获取上个月的开始和结束日期