Commit 4906bc69 authored by 赵啸非's avatar 赵啸非

设备列表导出优化

parent e6ed3153
...@@ -41,7 +41,6 @@ public abstract class AbstractTbQueueConsumerTemplate<R, T extends TbQueueMsg> i ...@@ -41,7 +41,6 @@ public abstract class AbstractTbQueueConsumerTemplate<R, T extends TbQueueMsg> i
@Override @Override
public void subscribe() { public void subscribe() {
if (stopped) { if (stopped) {
log.error("consumer 线程已停止 topic {}", topic); log.error("consumer 线程已停止 topic {}", topic);
return; return;
......
...@@ -60,8 +60,6 @@ public class TbRabbitMqConsumerTemplate<T extends TbQueueMsg> extends AbstractTb ...@@ -60,8 +60,6 @@ public class TbRabbitMqConsumerTemplate<T extends TbQueueMsg> extends AbstractTb
List<GetResponse> result = queues.stream() List<GetResponse> result = queues.stream()
.map(queue -> { .map(queue -> {
try { try {
//AMQP.Queue.DeclareOk declareOk = channel.queueDeclarePassive(queue);
//log.info("declareOk:{}",JSON.toJSONString(declareOk));
GetResponse getResponse = channel.basicGet(queue, true); GetResponse getResponse = channel.basicGet(queue, true);
return getResponse; return getResponse;
} catch (IOException e) { } catch (IOException e) {
...@@ -89,6 +87,7 @@ public class TbRabbitMqConsumerTemplate<T extends TbQueueMsg> extends AbstractTb ...@@ -89,6 +87,7 @@ public class TbRabbitMqConsumerTemplate<T extends TbQueueMsg> extends AbstractTb
queues = partitions.stream() queues = partitions.stream()
.map(TopicPartitionInfo::getFullTopicName) .map(TopicPartitionInfo::getFullTopicName)
.collect(Collectors.toSet()); .collect(Collectors.toSet());
log.info("doSubscribe:{}", JSON.toJSONString(queues));
} }
@Override @Override
......
...@@ -154,7 +154,7 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi ...@@ -154,7 +154,7 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi
if (Objects.nonNull(messages)) { if (Objects.nonNull(messages)) {
try { try {
for (TbQueueMsg queueMsg : messages) { for (TbQueueMsg queueMsg : messages) {
log.info("[WRITE MESSAGE] ->message:{}", JSON.toJSONString(queueMsg)); log.debug("[WRITE MESSAGE] ->message:{}", JSON.toJSONString(queueMsg));
//做相应业务,做日志操作 //做相应业务,做日志操作
// TODO: 2022/7/12 设备来源从设备编码中获取,内容不做处理 // TODO: 2022/7/12 设备来源从设备编码中获取,内容不做处理
String deviceCode = queueMsg.getHeaders().get("deviceCode"); String deviceCode = queueMsg.getHeaders().get("deviceCode");
......
...@@ -391,8 +391,6 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D ...@@ -391,8 +391,6 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
} }
} }
} }
if (!ObjectUtils.isEmpty(entity.getPlatformCode())) { if (!ObjectUtils.isEmpty(entity.getPlatformCode())) {
PlatformEntity platformEntity = platformService.selectOne(new PlatformQuery().platformSn(entity.getPlatformCode())); PlatformEntity platformEntity = platformService.selectOne(new PlatformQuery().platformSn(entity.getPlatformCode()));
if (!ObjectUtils.isEmpty(platformEntity)) { if (!ObjectUtils.isEmpty(platformEntity)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment