feat:() 解决合并冲突
parent
61f1ea45b2
commit
813fcf1b55
|
@ -4,12 +4,6 @@ import cn.hutool.core.thread.ThreadUtil;
|
|||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.nacos.shaded.com.google.common.collect.Lists;
|
||||
import com.muyu.common.core.utils.html.EscapeUtil;
|
||||
import com.muyu.domain.Fence;
|
||||
import com.muyu.domain.Vehicle;
|
||||
import com.muyu.domain.WarnRule;
|
||||
import com.muyu.domain.WarnStrategy;
|
||||
import com.muyu.domain.resp.VehicleManageResp;
|
||||
import com.muyu.processing.basic.EventPublisher;
|
||||
import com.muyu.processing.utils.CacheUtil;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
|
@ -83,18 +77,7 @@ public class KafkaConsumerService implements InitializingBean {
|
|||
log.info("从Kafka中消费的原始数据: " + originalMsg);
|
||||
//把消费数据转换为JSON对象
|
||||
JSONObject jsonObject = JSON.parseObject(originalMsg);
|
||||
// 获取VIN码
|
||||
String vin = (String) jsonObject.get("vin");
|
||||
log.info("vin码为: {}",vin);
|
||||
// 获取本地缓存中的数据
|
||||
// Map<String, Object> map = (Map<String, Object>) cacheUtil.get(vin);
|
||||
// log.info("map: {}",map);
|
||||
// Fence fence = (Fence) map.get("fence");
|
||||
// Object breakdown = map.get("breakdown");
|
||||
// Vehicle vehicle = (Vehicle) map.get("vehicle");
|
||||
// WarnRule warnRule = (WarnRule) map.get("warnRule");
|
||||
// WarnStrategy warnStrategy = (WarnStrategy) map.get("warnStrategy");
|
||||
// VehicleManageResp vehicleManageResp = (VehicleManageResp) map.get("vehicleManageResp");
|
||||
// 发布事件
|
||||
eventPublisher.eventPublish(jsonObject);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,12 +3,10 @@ package com.muyu.processing.consumer;
|
|||
import com.muyu.domain.Fence;
|
||||
import com.muyu.domain.Vehicle;
|
||||
import com.muyu.domain.WarnRule;
|
||||
import com.muyu.domain.WarnStrategy;
|
||||
import com.muyu.domain.resp.VehicleManageResp;
|
||||
import com.muyu.domain.resp.WarnRuleResp;
|
||||
import com.muyu.enterprise.cache.*;
|
||||
import com.muyu.processing.utils.CacheUtil;
|
||||
import com.rabbitmq.client.Channel;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.amqp.rabbit.annotation.Exchange;
|
||||
import org.springframework.amqp.rabbit.annotation.Queue;
|
||||
|
@ -89,6 +87,4 @@ public class OnLineMonitoringConsumer {
|
|||
log.info("vin码为: {}, 数据为: {}, 已完成本地缓存",vin,map);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue