Commit e289d4a1 by 罗志长

fix: 修改设备名称后同步至iot

parent 549ae016
...@@ -88,8 +88,6 @@ public class IotProductDeviceService extends IotCommonService { ...@@ -88,8 +88,6 @@ public class IotProductDeviceService extends IotCommonService {
String body = JsonUtil.toJson(reqMap); String body = JsonUtil.toJson(reqMap);
HttpRequest request = buildRequest(url, body); HttpRequest request = buildRequest(url, body);
request.encode("UTF-8");
request.contentType("application/json");
try { try {
ResponseMessage responseMessage = sendPatch(url, request); ResponseMessage responseMessage = sendPatch(url, request);
if (responseMessage.getStatus() == 200) { if (responseMessage.getStatus() == 200) {
......
...@@ -106,7 +106,7 @@ public class SimpleHttpRequest implements HttpRequest { ...@@ -106,7 +106,7 @@ public class SimpleHttpRequest implements HttpRequest {
public Response patch() throws IOException { public Response patch() throws IOException {
HttpPatch delete = new HttpPatch(url); HttpPatch delete = new HttpPatch(url);
if (requestBody != null) if (requestBody != null)
delete.setEntity(new StringEntity(requestBody, ContentType.create(contentType))); delete.setEntity(new StringEntity(requestBody, ContentType.create(contentType, encode)));
else { else {
delete.setEntity(createUrlEncodedFormEntity()); delete.setEntity(createUrlEncodedFormEntity());
} }
......
...@@ -380,11 +380,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev ...@@ -380,11 +380,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
platDeviceAttrWechatDTO.setDeviceId(db.getOriDeviceId()); platDeviceAttrWechatDTO.setDeviceId(db.getOriDeviceId());
editDeviceProperties(platDeviceAttrWechatDTO); editDeviceProperties(platDeviceAttrWechatDTO);
} }
iotProductDeviceService.syncUpdateDeviceInfo(db.getOriDeviceId(),dto.getName(),db.getProductId());
//iotProductDeviceService.syncUpdateDeviceInfo(db.getOriDeviceId(),dto.getName(),db.getProductId());
} }
@Override @Override
......
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 sign in to comment