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
37c06824
Commit
37c06824
authored
Jul 09, 2025
by
gdj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ai信息新增算法类型algorithmType
parent
eb464233
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
sample/src/main/java/com/dji/sample/ai/model/param/AiInfoSearchParam.java
+2
-0
sample/src/main/java/com/dji/sample/ai/service/impl/AiInfoServiceImpl.java
+10
-0
sample/src/main/java/com/dji/sample/ai/service/impl/SdkAiInfoServiceImpl.java
+1
-0
No files found.
sample/src/main/java/com/dji/sample/ai/model/param/AiInfoSearchParam.java
View file @
37c06824
...
...
@@ -27,4 +27,6 @@ public class AiInfoSearchParam {
@JsonProperty
(
"algorithm_type"
)
private
String
algorithmType
;
@JsonProperty
(
"order_by"
)
private
String
orderBy
;
}
sample/src/main/java/com/dji/sample/ai/service/impl/AiInfoServiceImpl.java
View file @
37c06824
...
...
@@ -52,6 +52,14 @@ public class AiInfoServiceImpl extends ServiceImpl<IAiInfoMapper, AiInfoEntity>
if
(!
ObjectUtils
.
isEmpty
(
param
.
getEndWarnTime
()))
{
wrapper
.
le
(
AiInfoEntity:
:
getWarnTime
,
param
.
getEndWarnTime
());
}
if
(
StringUtils
.
hasText
(
param
.
getOrderBy
()))
{
String
[]
arr
=
param
.
getOrderBy
().
split
(
" "
);
String
column
=
arr
[
0
];
String
desc
=
arr
.
length
>
1
?
arr
[
1
]
:
"desc"
;
wrapper
.
last
(
Objects
.
nonNull
(
param
.
getOrderBy
()),
" order by "
+
column
+
" "
+
desc
);
}
Page
<
AiInfoEntity
>
pagination
=
this
.
page
(
new
Page
<>(
page
,
pageSize
),
wrapper
);
List
<
AiInfoDTO
>
aiInfoDTOList
=
pagination
.
getRecords
().
stream
().
map
(
this
::
AiInfoEntityToDTO
)
...
...
@@ -76,6 +84,7 @@ public class AiInfoServiceImpl extends ServiceImpl<IAiInfoMapper, AiInfoEntity>
aiInfoDTO
.
setWarnTime
(
Objects
.
nonNull
(
aiInfoEntity
.
getWarnTime
())
?
LocalDateTime
.
ofInstant
(
Instant
.
ofEpochMilli
(
aiInfoEntity
.
getWarnTime
()),
ZoneId
.
systemDefault
())
:
null
);
aiInfoDTO
.
setJson
(
aiInfoEntity
.
getJson
());
aiInfoDTO
.
setAlgorithmType
(
aiInfoEntity
.
getAlgorithmType
());
return
aiInfoDTO
;
...
...
@@ -99,6 +108,7 @@ public class AiInfoServiceImpl extends ServiceImpl<IAiInfoMapper, AiInfoEntity>
aiInfoEntity
.
setWarnTime
(
aiInfoDTO
.
getWarnTime
().
atZone
(
ZoneId
.
systemDefault
()).
toInstant
().
toEpochMilli
());
}
aiInfoEntity
.
setJson
(
aiInfoDTO
.
getJson
());
aiInfoEntity
.
setAlgorithmType
(
aiInfoDTO
.
getAlgorithmType
());
return
aiInfoEntity
;
}
...
...
sample/src/main/java/com/dji/sample/ai/service/impl/SdkAiInfoServiceImpl.java
View file @
37c06824
...
...
@@ -51,6 +51,7 @@ public class SdkAiInfoServiceImpl extends AbstractAiInfoService {
aiInfoEntity
.
setWarnTime
(
jsonData
.
get
(
"warn_time"
).
asLong
());
aiInfoEntity
.
setImageUrl
(
jsonData
.
get
(
"image_url"
).
asText
());
aiInfoEntity
.
setWarnLocation
(
jsonData
.
get
(
"warn_location"
).
asText
());
aiInfoEntity
.
setAlgorithmType
(
jsonData
.
get
(
"algorithm_type"
).
asText
());
JsonNode
obj
=
jsonData
.
get
(
"obj"
);
if
(
obj
!=
null
)
{
aiInfoEntity
.
setJson
(
obj
.
toString
());
...
...
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