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
bea1933f
Commit
bea1933f
authored
Sep 23, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:模型列表接口出参修改
parent
e8815fb3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
49 deletions
+35
-49
BizAgentApplicationLargeModelListConvert.java
...ion/convert/BizAgentApplicationLargeModelListConvert.java
+0
-15
BizAgentApplicationLargeModelListDto.java
...application/dto/BizAgentApplicationLargeModelListDto.java
+20
-28
AgentApplicationInfoRestImpl.java
...t_application/rest/impl/AgentApplicationInfoRestImpl.java
+15
-6
No files found.
src/main/java/cn/com/poc/agent_application/convert/BizAgentApplicationLargeModelListConvert.java
View file @
bea1933f
...
@@ -22,20 +22,5 @@ public class BizAgentApplicationLargeModelListConvert {
...
@@ -22,20 +22,5 @@ public class BizAgentApplicationLargeModelListConvert {
model
.
setOwner
(
entity
.
getOwner
());
model
.
setOwner
(
entity
.
getOwner
());
return
model
;
return
model
;
}
}
public
static
BizAgentApplicationLargeModelListDto
entityToDto
(
BizAgentApplicationLargeModelListEntity
entity
){
BizAgentApplicationLargeModelListDto
dto
=
new
BizAgentApplicationLargeModelListDto
();
dto
.
setId
(
entity
.
getId
());
dto
.
setModelName
(
entity
.
getModelName
());
dto
.
setOwner
(
entity
.
getOwner
());
return
dto
;
}
public
static
BizAgentApplicationLargeModelListEntity
dtoToEntity
(
BizAgentApplicationLargeModelListDto
dto
){
BizAgentApplicationLargeModelListEntity
entity
=
new
BizAgentApplicationLargeModelListEntity
();
entity
.
setId
(
dto
.
getId
());
entity
.
setModelName
(
dto
.
getModelName
());
entity
.
setOwner
(
dto
.
getOwner
());
return
entity
;
}
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/dto/BizAgentApplicationLargeModelListDto.java
View file @
bea1933f
package
cn
.
com
.
poc
.
agent_application
.
dto
;
package
cn
.
com
.
poc
.
agent_application
.
dto
;
import
java.util.List
;
public
class
BizAgentApplicationLargeModelListDto
{
public
class
BizAgentApplicationLargeModelListDto
{
private
static
final
long
serialVersionUID
=
1L
;
/**
/** id
* models
*
* 模型
*/
*/
private
java
.
lang
.
Integer
id
;
private
List
<
String
>
models
;
public
java
.
lang
.
Integer
getId
(){
public
List
<
String
>
getModels
()
{
return
this
.
id
;
return
models
;
}
public
void
setId
(
java
.
lang
.
Integer
id
){
this
.
id
=
id
;
}
}
/** model_name
*模型
*/
private
java
.
lang
.
String
modelName
;
public
java
.
lang
.
String
getModelName
(){
public
void
setModels
(
List
<
String
>
models
)
{
return
this
.
modelName
;
this
.
models
=
models
;
}
public
void
setModelName
(
java
.
lang
.
String
modelName
){
this
.
modelName
=
modelName
;
}
}
/** owner
*模型服务商
/**
*/
* owner
* 模型服务商
*/
private
java
.
lang
.
String
owner
;
private
java
.
lang
.
String
owner
;
public
java
.
lang
.
String
getOwner
(){
public
java
.
lang
.
String
getOwner
()
{
return
this
.
owner
;
return
this
.
owner
;
}
}
public
void
setOwner
(
java
.
lang
.
String
owner
){
public
void
setOwner
(
java
.
lang
.
String
owner
)
{
this
.
owner
=
owner
;
this
.
owner
=
owner
;
}
}
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/rest/impl/AgentApplicationInfoRestImpl.java
View file @
bea1933f
...
@@ -6,6 +6,7 @@ import cn.com.poc.agent_application.convert.BizAgentApplicationLargeModelListCon
...
@@ -6,6 +6,7 @@ import cn.com.poc.agent_application.convert.BizAgentApplicationLargeModelListCon
import
cn.com.poc.agent_application.dto.*
;
import
cn.com.poc.agent_application.dto.*
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationInfoEntity
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationInfoEntity
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationLargeModelListEntity
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationLargeModelListEntity
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationPublishEntity
;
import
cn.com.poc.agent_application.entity.CreateAgentTitleAndDescEntity
;
import
cn.com.poc.agent_application.entity.CreateAgentTitleAndDescEntity
;
import
cn.com.poc.agent_application.query.AgentApplicationInfoQueryCondition
;
import
cn.com.poc.agent_application.query.AgentApplicationInfoQueryCondition
;
import
cn.com.poc.agent_application.rest.AgentApplicationInfoRest
;
import
cn.com.poc.agent_application.rest.AgentApplicationInfoRest
;
...
@@ -26,6 +27,7 @@ import java.io.IOException;
...
@@ -26,6 +27,7 @@ import java.io.IOException;
import
java.io.PrintWriter
;
import
java.io.PrintWriter
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@Component
@Component
...
@@ -138,11 +140,18 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
...
@@ -138,11 +140,18 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
@Override
@Override
public
List
<
BizAgentApplicationLargeModelListDto
>
getLargeModelList
()
throws
Exception
{
public
List
<
BizAgentApplicationLargeModelListDto
>
getLargeModelList
()
throws
Exception
{
return
bizAgentApplicationLargeModelListService
List
<
BizAgentApplicationLargeModelListEntity
>
entities
=
bizAgentApplicationLargeModelListService
.
findByExample
(
new
BizAgentApplicationLargeModelListEntity
(),
null
);
.
findByExample
(
new
BizAgentApplicationLargeModelListEntity
(),
null
)
Map
<
String
,
List
<
String
>>
map
=
entities
.
stream
()
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
BizAgentApplicationLargeModelListEntity:
:
getOwner
.
map
(
BizAgentApplicationLargeModelListConvert:
:
entityToDto
)
,
Collectors
.
mapping
(
BizAgentApplicationLargeModelListEntity:
:
getModelName
,
Collectors
.
toList
())));
.
collect
(
Collectors
.
toList
());
List
<
BizAgentApplicationLargeModelListDto
>
result
=
new
ArrayList
<>();
for
(
String
owner
:
map
.
keySet
())
{
BizAgentApplicationLargeModelListDto
dto
=
new
BizAgentApplicationLargeModelListDto
();
dto
.
setOwner
(
owner
);
dto
.
setModels
(
map
.
get
(
owner
));
result
.
add
(
dto
);
}
return
result
;
}
}
...
@@ -159,7 +168,7 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
...
@@ -159,7 +168,7 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
@Override
@Override
public
String
createPreamble
(
AgentApplicationGCDto
dto
)
throws
Exception
{
public
String
createPreamble
(
AgentApplicationGCDto
dto
)
throws
Exception
{
return
agentApplicationInfoService
.
createPreamble
(
dto
.
getAgentTitle
(),
dto
.
getAgentDesc
(),
dto
.
getAgentSystem
());
return
agentApplicationInfoService
.
createPreamble
(
dto
.
getAgentTitle
(),
dto
.
getAgentDesc
(),
dto
.
getAgentSystem
());
}
}
@Override
@Override
...
...
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