Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e289d4a1
authored
Dec 20, 2023
by
罗志长
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix: 修改设备名称后同步至iot
parent
549ae016
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
8 deletions
server-common/src/main/java/com/makeit/module/iot/service/IotProductDeviceService.java
server-common/src/main/java/com/makeit/module/iot/util/SimpleHttpRequest.java
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
server-common/src/main/java/com/makeit/module/iot/service/IotProductDeviceService.java
View file @
e289d4a1
...
...
@@ -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
)
{
...
...
server-common/src/main/java/com/makeit/module/iot/util/SimpleHttpRequest.java
View file @
e289d4a1
...
...
@@ -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
());
}
...
...
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
View file @
e289d4a1
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment