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
901c0735
Commit
901c0735
authored
Jul 07, 2025
by
gdj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ai信息增加查询参数2。
parent
8518d692
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletions
+16
-1
sample/src/main/java/com/dji/sample/ai/model/param/AiInfoSearchParam.java
+7
-0
sample/src/main/java/com/dji/sample/ai/service/impl/AiInfoServiceImpl.java
+9
-1
No files found.
sample/src/main/java/com/dji/sample/ai/model/param/AiInfoSearchParam.java
View file @
901c0735
...
...
@@ -18,4 +18,11 @@ public class AiInfoSearchParam {
@JsonProperty
(
"warn_event"
)
private
String
warnEvent
;
@JsonProperty
(
"start_warn_time"
)
private
Long
startWarnTime
;
@JsonProperty
(
"end_warn_time"
)
private
Long
endWarnTime
;
}
sample/src/main/java/com/dji/sample/ai/service/impl/AiInfoServiceImpl.java
View file @
901c0735
...
...
@@ -9,9 +9,11 @@ import com.dji.sample.ai.model.dto.AiInfoDTO;
import
com.dji.sample.ai.model.entity.AiInfoEntity
;
import
com.dji.sample.ai.model.param.AiInfoSearchParam
;
import
com.dji.sample.ai.service.IAiInfoService
;
import
com.dji.sample.wayline.model.entity.WaylineJobEntity
;
import
com.dji.sdk.common.Pagination
;
import
com.dji.sdk.common.PaginationData
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
java.time.Instant
;
...
...
@@ -33,7 +35,7 @@ public class AiInfoServiceImpl extends ServiceImpl<IAiInfoMapper, AiInfoEntity>
LambdaQueryWrapper
<
AiInfoEntity
>
wrapper
=
new
LambdaQueryWrapper
<>();
if
(
StringUtils
.
hasText
(
param
.
getDeviceSn
()))
{
wrapper
.
eq
(
AiInfoEntity:
:
getDeviceSn
,
param
.
getDeviceSn
());
wrapper
.
like
(
AiInfoEntity:
:
getDeviceSn
,
param
.
getDeviceSn
());
}
if
(
StringUtils
.
hasText
(
param
.
getWarnEvent
()))
{
wrapper
.
like
(
AiInfoEntity:
:
getWarnEvent
,
param
.
getWarnEvent
());
...
...
@@ -41,6 +43,12 @@ public class AiInfoServiceImpl extends ServiceImpl<IAiInfoMapper, AiInfoEntity>
if
(
StringUtils
.
hasText
(
param
.
getWarnType
()))
{
wrapper
.
eq
(
AiInfoEntity:
:
getWarnType
,
param
.
getWarnType
());
}
if
(!
ObjectUtils
.
isEmpty
(
param
.
getStartWarnTime
()))
{
wrapper
.
ge
(
AiInfoEntity:
:
getWarnTime
,
param
.
getStartWarnTime
());
}
if
(!
ObjectUtils
.
isEmpty
(
param
.
getEndWarnTime
()))
{
wrapper
.
le
(
AiInfoEntity:
:
getWarnTime
,
param
.
getEndWarnTime
());
}
Page
<
AiInfoEntity
>
pagination
=
this
.
page
(
new
Page
<>(
page
,
pageSize
),
wrapper
);
List
<
AiInfoDTO
>
aiInfoDTOList
=
pagination
.
getRecords
().
stream
().
map
(
this
::
AiInfoEntityToDTO
)
...
...
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