Commit ff6ae83e authored by 赵啸非's avatar 赵啸非

添加前端页面

parent c4a5f851
......@@ -8,10 +8,9 @@ import com.mortals.xhx.common.model.DefaultTbQueueMsgHeaders;
import com.mortals.xhx.common.model.MessageHeader;
import com.mortals.xhx.queue.*;
import com.mortals.xhx.queue.kafka.AbstractTbQueueConsumerTemplate;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.GetResponse;
import com.rabbitmq.client.*;
import lombok.Getter;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.ObjectUtils;
......@@ -48,11 +47,15 @@ public class TbRabbitMqConsumerTemplate<T extends TbQueueMsg> extends AbstractTb
stopped = false;
}
@SneakyThrows
@Override
protected List<GetResponse> doPoll(long durationInMillis) {
List<GetResponse> result = queues.stream()
.map(queue -> {
try {
AMQP.Queue.DeclareOk declareOk = channel.queueDeclarePassive(queue);
log.info("declareOk:{}",JSON.toJSONString(declareOk));
GetResponse getResponse = channel.basicGet(queue, true);
return getResponse;
} catch (IOException e) {
......
......@@ -6,7 +6,7 @@
:direction="direction"
size="70%"
>
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field label="设备名称" prop="deviceName" v-model="form.deviceName" placeholder="请输入设备名称"/>
......
......@@ -389,7 +389,7 @@ public class DeviceApiController {
}
/**
* 设备数据上报
* 第三方回调
*
* @param list
* @return
......
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