From 676f4fa8f3c524e03b825258fd4e5b36741daffd Mon Sep 17 00:00:00 2001 From: ffr <492210217@qq.com> Date: Sat, 6 Apr 2024 11:03:16 +0800 Subject: [PATCH] 1111 --- .../main/java/com/couplet/common/domain/Vehicle.java | 1 + .../controller/VehicleDetectionController.java | 12 ++++++++++++ .../server/service/VehicleDetectionService.java | 2 +- .../service/impl/VehicleDetectionServiceImpl.java | 6 ++---- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/couplet-common/couplet-common-business/src/main/java/com/couplet/common/domain/Vehicle.java b/couplet-common/couplet-common-business/src/main/java/com/couplet/common/domain/Vehicle.java index fbe6b10..61dcca0 100644 --- a/couplet-common/couplet-common-business/src/main/java/com/couplet/common/domain/Vehicle.java +++ b/couplet-common/couplet-common-business/src/main/java/com/couplet/common/domain/Vehicle.java @@ -29,6 +29,7 @@ public class Vehicle { * @description 中间表id * @date */ + @TableField(exist = false) private Long middleId; /* *车辆id diff --git a/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/controller/VehicleDetectionController.java b/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/controller/VehicleDetectionController.java index 96e804b..728f5f4 100644 --- a/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/controller/VehicleDetectionController.java +++ b/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/controller/VehicleDetectionController.java @@ -2,14 +2,17 @@ package com.couplet.business.server.controller; import com.couplet.business.server.service.VehicleDetectionService; import com.couplet.common.core.domain.Result; +import com.couplet.common.domain.CoupletVehicleData; import com.couplet.common.domain.Vehicle; import com.couplet.common.domain.request.RealTimeDataRequest; import com.couplet.common.security.utils.SecurityUtils; import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisTemplate; import org.springframework.web.bind.annotation.*; import java.util.List; +import java.util.Objects; /** * @author fufanrui @@ -23,10 +26,14 @@ import java.util.List; public class VehicleDetectionController { + @Autowired private VehicleDetectionService vehicleDetectionService; @Autowired private RabbitTemplate rabbitTemplate; + @Autowired + private RedisTemplate redisTemplate; + private final String REDIS_LIST_KEY = "coupletMsgData"; /* * @param : * @return Result> @@ -58,4 +65,9 @@ public class VehicleDetectionController { rabbitTemplate.convertAndSend(exchangeName, routingKey, realTimeDataRequest); } + + + + + } diff --git a/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/VehicleDetectionService.java b/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/VehicleDetectionService.java index 3145db7..20f587f 100644 --- a/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/VehicleDetectionService.java +++ b/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/VehicleDetectionService.java @@ -1,5 +1,6 @@ package com.couplet.business.server.service; +import com.couplet.common.core.domain.Result; import com.couplet.common.domain.Vehicle; import java.util.List; @@ -8,5 +9,4 @@ public interface VehicleDetectionService { List detectionList(); - List findByVin(String vehicleId); } diff --git a/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/impl/VehicleDetectionServiceImpl.java b/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/impl/VehicleDetectionServiceImpl.java index 078780f..f1866a5 100644 --- a/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/impl/VehicleDetectionServiceImpl.java +++ b/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/impl/VehicleDetectionServiceImpl.java @@ -2,6 +2,8 @@ package com.couplet.business.server.service.impl; import com.couplet.business.server.mapper.VehicleDetectionMapper; import com.couplet.business.server.service.VehicleDetectionService; +import com.couplet.business.server.service.VehicleManageService; +import com.couplet.common.core.domain.Result; import com.couplet.common.domain.Vehicle; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -25,8 +27,4 @@ public class VehicleDetectionServiceImpl implements VehicleDetectionService{ return vehicleDetectionMapper.detectionList(); } - @Override - public List findByVin(String vehicleId) { - return vehicleDetectionMapper.findByVin(vehicleId); - } }