Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-api
Commits
d647b9c9
Commit
d647b9c9
authored
Oct 21, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Agent应用 获取官方创建应用列表
parent
3715611e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
AgentApplicationRest.java
...ain/java/cn/com/poc/expose/rest/AgentApplicationRest.java
+6
-0
AgentApplicationRestImpl.java
...cn/com/poc/expose/rest/impl/AgentApplicationRestImpl.java
+22
-0
No files found.
src/main/java/cn/com/poc/expose/rest/AgentApplicationRest.java
View file @
d647b9c9
...
@@ -43,6 +43,12 @@ public interface AgentApplicationRest extends BaseRest {
...
@@ -43,6 +43,12 @@ public interface AgentApplicationRest extends BaseRest {
@Permission
(
value
=
Access
.
Anonymous
)
@Permission
(
value
=
Access
.
Anonymous
)
BizAgentApplicationPublishDto
getInfo
(
@RequestParam
String
agentId
)
throws
Exception
;
BizAgentApplicationPublishDto
getInfo
(
@RequestParam
String
agentId
)
throws
Exception
;
/**
* 获取 已发布[官方]默认应用列表
*/
@Permission
(
value
=
Access
.
Anonymous
)
List
<
SearchAgentApplicationDto
>
getDefaultList
(
PagingInfo
pagingInfo
)
throws
Exception
;
/**
/**
* 下架已发布应用
* 下架已发布应用
*/
*/
...
...
src/main/java/cn/com/poc/expose/rest/impl/AgentApplicationRestImpl.java
View file @
d647b9c9
...
@@ -102,6 +102,28 @@ public class AgentApplicationRestImpl implements AgentApplicationRest {
...
@@ -102,6 +102,28 @@ public class AgentApplicationRestImpl implements AgentApplicationRest {
return
BizAgentApplicationPublishConvert
.
entityToDto
(
entity
);
return
BizAgentApplicationPublishConvert
.
entityToDto
(
entity
);
}
}
@Override
public
List
<
SearchAgentApplicationDto
>
getDefaultList
(
PagingInfo
pagingInfo
)
throws
Exception
{
List
<
SearchAgentApplicationDto
>
result
=
new
ArrayList
<>();
BizAgentApplicationPublishEntity
publishEntity
=
new
BizAgentApplicationPublishEntity
();
publishEntity
.
setMemberId
(
0
);
publishEntity
.
setIsDeleted
(
CommonConstant
.
IsDeleted
.
N
);
List
<
BizAgentApplicationPublishEntity
>
entities
=
bizAgentApplicationPublishService
.
findByExample
(
publishEntity
,
pagingInfo
);
if
(
CollectionUtils
.
isNotEmpty
(
entities
))
{
result
=
entities
.
stream
().
map
(
value
->
{
SearchAgentApplicationDto
searchAgentApplicationDto
=
new
SearchAgentApplicationDto
();
searchAgentApplicationDto
.
setAgentId
(
value
.
getAgentId
());
searchAgentApplicationDto
.
setAgentTitle
(
value
.
getAgentTitle
());
searchAgentApplicationDto
.
setAgentDesc
(
value
.
getAgentDesc
());
searchAgentApplicationDto
.
setAgentAvatar
(
value
.
getAgentAvatar
());
searchAgentApplicationDto
.
setPublishedTime
(
value
.
getModifiedTime
());
searchAgentApplicationDto
.
setCreator
(
"官方"
);
return
searchAgentApplicationDto
;
}).
collect
(
Collectors
.
toList
());
}
return
result
;
}
@Override
@Override
public
void
unPublish
(
String
agentId
)
throws
Exception
{
public
void
unPublish
(
String
agentId
)
throws
Exception
{
Assert
.
notBlank
(
agentId
,
"应用ID不能为空"
);
Assert
.
notBlank
(
agentId
,
"应用ID不能为空"
);
...
...
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