upd
parent
f251581efb
commit
b04bd0ce13
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue