Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
da3ab932
Commit
da3ab932
authored
Dec 23, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改上下线通知
parent
94b02d89
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
10 deletions
+15
-10
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+9
-7
device-manager/src/main/java/com/mortals/xhx/thread/SendThirdPartyThread.java
...ain/java/com/mortals/xhx/thread/SendThirdPartyThread.java
+2
-2
device-manager/src/test/java/com/mortals/httpclient/http-client.env.json
...src/test/java/com/mortals/httpclient/http-client.env.json
+4
-1
No files found.
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
View file @
da3ab932
...
...
@@ -31,6 +31,7 @@ import com.mortals.xhx.busiz.rsp.*;
import
com.mortals.xhx.common.code.*
;
import
com.mortals.xhx.common.key.Constant
;
import
com.mortals.xhx.common.key.QueueKey
;
import
com.mortals.xhx.common.key.RedisKey
;
import
com.mortals.xhx.common.model.DefaultTbQueueMsgHeaders
;
import
com.mortals.xhx.common.model.MessageHeader
;
import
com.mortals.xhx.common.pdu.DeviceReq
;
...
...
@@ -246,13 +247,14 @@ public class DeviceApiController {
deviceEntity
.
setDeviceStatus
(
DeviceStatusEnum
.
在线
.
getValue
());
deviceEntity
.
setDeviceVersion
(
req
.
getDeviceVersion
()
==
null
?
""
:
req
.
getDeviceVersion
());
/* if(deviceEntity.getDeviceStatus()== DeviceStatusEnum.离线.getValue()){
DeviceEntity entity = new DeviceEntity();
entity.setId(deviceEntity.getId());
entity.setOnlineTime(new Date());
entity.setDeviceStatus(DeviceStatusEnum.在线.getValue());
cacheService.lpush(RedisKey.KEY_DEVICE_THIRDPARTY_QUEUE, entity);
}*/
if
(
deviceEntity
.
getDeviceStatus
()==
DeviceStatusEnum
.
离线
.
getValue
()){
DeviceEntity
condition
=
new
DeviceEntity
();
condition
.
setId
(
deviceEntity
.
getId
());
condition
.
setOnlineTime
(
new
Date
());
condition
.
setDeviceStatus
(
DeviceStatusEnum
.
在线
.
getValue
());
cacheService
.
lpush
(
RedisKey
.
KEY_DEVICE_THIRDPARTY_QUEUE
,
condition
);
cacheService
.
lpush
(
RedisKey
.
KEY_DEVICE_UPDATE_QUEUE
,
condition
);
}
// deviceService.getDeviceDao().update(deviceEntity);
rsp
.
setData
(
deviceResp
);
/* SendThirdPartyTask sendThirdPartyTask = new SendThirdPartyTask(deviceEntity, productEntity, platformEntity, deviceService);
...
...
device-manager/src/main/java/com/mortals/xhx/thread/SendThirdPartyThread.java
View file @
da3ab932
...
...
@@ -65,9 +65,9 @@ public class SendThirdPartyThread extends AbstractThread {
for
(
DeviceReq
deviceMsgReq
:
deviceMsgReqs
)
{
//设备上下线信息 不更新通知
if
(
DeviceMethodEnum
.
ONLINE
.
getValue
()
==
deviceMsgReq
.
getDeviceStatus
()
||
DeviceMethodEnum
.
OFFLINE
.
getValue
()
==
deviceMsgReq
.
getDeviceStatus
())
{
/*
if (DeviceMethodEnum.ONLINE.getValue() == deviceMsgReq.getDeviceStatus() || DeviceMethodEnum.OFFLINE.getValue() == deviceMsgReq.getDeviceStatus()) {
return;
}
}
*/
//deviceReq.getReceiveMethod()
String
phpInUrl
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_PHP_IN_HTTP_URL
,
"http://127.0.0.1:11078/zwfw_api"
);
ApiResp
<
String
>
resp
=
messageService
.
sendThirdParty
(
UrlBuilder
.
of
(
phpInUrl
).
addPath
(
thirdPartyPath
).
build
(),
deviceMsgReq
);
...
...
device-manager/src/test/java/com/mortals/httpclient/http-client.env.json
View file @
da3ab932
...
...
@@ -36,6 +36,9 @@
"yibin-web"
:
{
"baseUrl"
:
"http://112.19.80.237:11091/m"
}
}
,
"reg-web"
:
{
"baseUrl"
:
"http://8.136.255.30:1136/m"
}
}
\ No newline at end of file
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