Commit e289d4a1 by 罗志长

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

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