Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
GeoFlyApi
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GeoFly
GeoFlyApi
Commits
c5d9d9ee
Commit
c5d9d9ee
authored
Mar 05, 2026
by
gdj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
无人机下线不删除payload表。
parent
76688392
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
sample/src/main/java/com/dji/sample/manage/service/impl/DevicePayloadServiceImpl.java
+6
-0
No files found.
sample/src/main/java/com/dji/sample/manage/service/impl/DevicePayloadServiceImpl.java
View file @
c5d9d9ee
...
...
@@ -139,6 +139,12 @@ public class DevicePayloadServiceImpl implements IDevicePayloadService {
* @param payloads
*/
public
void
updatePayloadControl
(
DeviceDTO
drone
,
List
<
DevicePayloadReceiver
>
payloads
)
{
// 检查设备是否在线,不在线则不更新payload,避免异常离线导致数据丢失
if
(!
deviceRedisService
.
checkDeviceOnline
(
drone
.
getDeviceSn
()))
{
log
.
warn
(
"Device {} is offline, skipping payload update."
,
drone
.
getDeviceSn
());
return
;
}
boolean
match
=
payloads
.
stream
().
peek
(
p
->
p
.
setSn
(
Objects
.
requireNonNullElse
(
p
.
getSn
(),
p
.
getDeviceSn
()
+
"-"
+
p
.
getPayloadIndex
().
getPosition
().
getPosition
())))
.
anyMatch
(
p
->
ControlSourceEnum
.
UNKNOWN
==
p
.
getControlSource
());
...
...
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