From b04bd0ce138a669a9888c5f1e391eb234cc49848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=AF=E5=87=AF?= <371894675@qq.com> Date: Tue, 5 Dec 2023 09:00:37 +0800 Subject: [PATCH] upd --- .../vehicle/controller/VehicleOnlineController.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/com/vehicle/controller/VehicleOnlineController.java b/src/main/java/com/vehicle/controller/VehicleOnlineController.java index 0aa1bb6..38c32f4 100644 --- a/src/main/java/com/vehicle/controller/VehicleOnlineController.java +++ b/src/main/java/com/vehicle/controller/VehicleOnlineController.java @@ -1,16 +1,23 @@ package com.vehicle.controller; +import com.dragon.common.redis.service.RedisService; import com.vehicle.domain.common.req.VehicleOnlineReq; import com.vehicle.service.VehicleService; +import lombok.extern.log4j.Log4j2; import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.cache.CacheProperties; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + /** * @author 冯凯 * @version 1.0 @@ -19,11 +26,14 @@ import org.springframework.web.bind.annotation.RestController; */ @RestController @RequestMapping("/vehicle") +@Log4j2 public class VehicleOnlineController { @Autowired private VehicleService vehicleService; + @Autowired + private RedisService redisService; /** * 将车辆在线请求转换为车辆在线对象 @@ -34,6 +44,7 @@ public class VehicleOnlineController { public String vehicleOnline(@RequestBody @Validated VehicleOnlineReq vehicleOnlineReq) { String topic = vehicleService.vehicleOnline(vehicleOnlineReq); //返回该车辆的主题 + log.info("topic:{}", topic); return topic; }