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

修改第三方发送

parent 8bcfbc5e
package com.mortals.xhx.module.device.service.impl;
import cn.hutool.core.lang.PatternPool;
import com.alibaba.fastjson.JSON;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICacheService;
......@@ -206,9 +207,12 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
&& entity.getSwitchSend()) {
if (PatternPool.URL_HTTP.matcher(platformEntity.getSendUrl()).find()) {
ApiResp<String> resp = messageService.sendThirdParty(platformEntity.getSendUrl(), deviceReq);
log.info("sendThirtyis resp ==>{}", JSON.toJSONString(resp));
} else {
throw new AppException("http send url 不合法!" + platformEntity.getSendUrl());
}
}else{
log.info("sendThirtyis null ==>{}", JSON.toJSONString(platformEntity));
}
}
......
......@@ -326,6 +326,7 @@ headers|Object|消息头|是|-
&emsp;data|Object|消息头数据对象|是|-
&emsp;&emsp;protocol|String|数据域协议类型,默认json|是|-
&emsp;&emsp;messageType|String|上报消息类型|是|HEART_BEAT
&emsp;&emsp;deviceCode|String|设备编码信息|是|如:mac地址
&emsp;&emsp;sign|String|签名|是|-
&emsp;&emsp;timestamp|String|时间戳|是|-
data|byte[]|byte数组,base64编码|是|-
......@@ -339,6 +340,7 @@ key|String|消息唯一标识|是|-
"data":{
"protocol":"json",
"messageType":"HEART_BEAT",
"deviceCode":"A1:A2:A3:A4:A5:A6",
"sign":"abcd1234",
"timestamp":"2022-04-15 09:48:05"
}
......@@ -365,6 +367,7 @@ headers|Object|消息头|是|-
&emsp;data|Object|消息头数据对象|是|-
&emsp;&emsp;protocol|String|数据域协议类型,默认json|是|-
&emsp;&emsp;messageType|String|下发消息类型|是|DOWN_UPGREAD
&emsp;&emsp;deviceCode|String|设备编码信息|是|如:mac地址
&emsp;&emsp;sign|String|签名|是|-
&emsp;&emsp;timestamp|String|时间戳|是|-
data|byte[]|byte数组,base64编码|是|-
......@@ -378,6 +381,7 @@ key|String|消息唯一标识|是|-
"data":{
"protocol":"json",
"messageType":"UPGREAD",
"deviceCode":"A1:A2:A3:A4:A5:A6",
"sign":"abcd1234",
"timestamp":"2022-04-15 09:48:05"
}
......
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