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
41a1df5a
Commit
41a1df5a
authored
Mar 19, 2026
by
gdj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加aiInfo的curd接口
parent
46a765cf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
0 deletions
+59
-0
sample/src/main/java/com/dji/sample/ai/controller/AiInfoController.java
+24
-0
sample/src/main/java/com/dji/sample/ai/service/IAiInfoService.java
+8
-0
sample/src/main/java/com/dji/sample/ai/service/impl/AiInfoServiceImpl.java
+24
-0
sample/src/main/java/com/dji/sample/configuration/mvc/GlobalMVCConfigurer.java
+3
-0
No files found.
sample/src/main/java/com/dji/sample/ai/controller/AiInfoController.java
View file @
41a1df5a
...
...
@@ -50,4 +50,28 @@ public class AiInfoController {
return
HttpResultResponse
.
success
(
paginationData
);
}
@PostMapping
(
"/add"
)
public
HttpResultResponse
<
AiInfoDTO
>
addAiInfo
(
@RequestBody
@Valid
AiInfoDTO
aiInfoDTO
)
{
AiInfoDTO
dto
=
aiInfoService
.
createAiInfo
(
aiInfoDTO
);
return
HttpResultResponse
.
success
(
dto
);
}
@GetMapping
(
"/get"
)
public
HttpResultResponse
<
AiInfoDTO
>
getAiInfo
(
@RequestParam
Long
id
)
{
AiInfoDTO
dto
=
aiInfoService
.
getAiInfoById
(
id
);
return
HttpResultResponse
.
success
(
dto
);
}
@PostMapping
(
"/update"
)
public
HttpResultResponse
<
Boolean
>
updateAiInfo
(
@RequestBody
@Valid
AiInfoDTO
aiInfoDTO
)
{
boolean
ok
=
aiInfoService
.
updateAiInfo
(
aiInfoDTO
);
return
HttpResultResponse
.
success
(
ok
);
}
@PostMapping
(
"/delete"
)
public
HttpResultResponse
<
Boolean
>
deleteAiInfo
(
@RequestParam
Long
id
)
{
boolean
ok
=
aiInfoService
.
deleteAiInfoById
(
id
);
return
HttpResultResponse
.
success
(
ok
);
}
}
sample/src/main/java/com/dji/sample/ai/service/IAiInfoService.java
View file @
41a1df5a
...
...
@@ -13,4 +13,12 @@ public interface IAiInfoService extends IService<AiInfoEntity> {
PaginationData
<
AiInfoDTO
>
getAiInfoPageByParam
(
AiInfoSearchParam
param
,
Long
page
,
Long
pageSize
);
AiInfoDTO
createAiInfo
(
AiInfoDTO
dto
);
AiInfoDTO
getAiInfoById
(
Long
id
);
boolean
updateAiInfo
(
AiInfoDTO
dto
);
boolean
deleteAiInfoById
(
Long
id
);
}
sample/src/main/java/com/dji/sample/ai/service/impl/AiInfoServiceImpl.java
View file @
41a1df5a
...
...
@@ -112,4 +112,28 @@ public class AiInfoServiceImpl extends ServiceImpl<IAiInfoMapper, AiInfoEntity>
return
aiInfoEntity
;
}
@Override
public
AiInfoDTO
createAiInfo
(
AiInfoDTO
dto
)
{
AiInfoEntity
entity
=
AiInfoDTOToEntity
(
dto
);
this
.
save
(
entity
);
return
AiInfoEntityToDTO
(
entity
);
}
@Override
public
AiInfoDTO
getAiInfoById
(
Long
id
)
{
AiInfoEntity
entity
=
this
.
getById
(
id
);
return
Objects
.
nonNull
(
entity
)
?
AiInfoEntityToDTO
(
entity
)
:
null
;
}
@Override
public
boolean
updateAiInfo
(
AiInfoDTO
dto
)
{
AiInfoEntity
entity
=
AiInfoDTOToEntity
(
dto
);
return
this
.
updateById
(
entity
);
}
@Override
public
boolean
deleteAiInfoById
(
Long
id
)
{
return
this
.
removeById
(
id
);
}
}
sample/src/main/java/com/dji/sample/configuration/mvc/GlobalMVCConfigurer.java
View file @
41a1df5a
...
...
@@ -40,6 +40,9 @@ public class GlobalMVCConfigurer implements WebMvcConfigurer {
excludePaths
.
add
(
"/"
+
managePrefix
+
manageVersion
+
"/live/streams/start2"
);
excludePaths
.
add
(
"/"
+
managePrefix
+
manageVersion
+
"/live/streams/stop2"
);
excludePaths
.
add
(
"/"
+
managePrefix
+
manageVersion
+
"/live/oneCapacity2"
);
// 放行 aiInfo 新增与修改接口
excludePaths
.
add
(
"/"
+
managePrefix
+
manageVersion
+
"/aiInfo/add"
);
excludePaths
.
add
(
"/"
+
managePrefix
+
manageVersion
+
"/aiInfo/update"
);
// Intercept for all request interfaces.
registry
.
addInterceptor
(
authInterceptor
).
addPathPatterns
(
"/**"
).
excludePathPatterns
(
excludePaths
);
}
...
...
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