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
cd9f9847
Commit
cd9f9847
authored
Nov 04, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Agent应用分类列表
parent
8a9b0f75
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
373 additions
and
7 deletions
+373
-7
BizAgentApplicationCategoryConvert.java
...plication/convert/BizAgentApplicationCategoryConvert.java
+44
-0
BizAgentApplicationCategoryEntity.java
...application/entity/BizAgentApplicationCategoryEntity.java
+55
-0
BizAgentApplicationCategoryModel.java
...t_application/model/BizAgentApplicationCategoryModel.java
+92
-0
BizAgentApplicationCategoryRepository.java
...ion/repository/BizAgentApplicationCategoryRepository.java
+6
-0
BizAgentApplicationMallRest.java
...c/agent_application/rest/BizAgentApplicationMallRest.java
+15
-5
BizAgentApplicationMallRestImpl.java
...pplication/rest/impl/BizAgentApplicationMallRestImpl.java
+33
-0
BizAgentApplicationCategoryService.java
...plication/service/BizAgentApplicationCategoryService.java
+21
-0
BizAgentApplicationCategoryServiceImpl.java
.../service/impl/BizAgentApplicationCategoryServiceImpl.java
+82
-0
XLangConstant.java
src/main/java/cn/com/poc/common/constant/XLangConstant.java
+13
-0
AgentApplicationInfoTest.java
src/test/java/cn/com/poc/AgentApplicationInfoTest.java
+12
-2
No files found.
src/main/java/cn/com/poc/agent_application/convert/BizAgentApplicationCategoryConvert.java
0 → 100644
View file @
cd9f9847
package
cn
.
com
.
poc
.
agent_application
.
convert
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationCategoryEntity
;
import
cn.com.poc.agent_application.model.BizAgentApplicationCategoryModel
;
public
class
BizAgentApplicationCategoryConvert
{
public
static
BizAgentApplicationCategoryEntity
modelToEntity
(
BizAgentApplicationCategoryModel
model
)
{
BizAgentApplicationCategoryEntity
entity
=
new
BizAgentApplicationCategoryEntity
();
entity
.
setId
(
model
.
getId
());
entity
.
setCategory
(
model
.
getCategory
());
entity
.
setCategoryTw
(
model
.
getCategoryTw
());
entity
.
setCategoryEn
(
model
.
getCategoryEn
());
return
entity
;
}
public
static
BizAgentApplicationCategoryModel
entityToModel
(
BizAgentApplicationCategoryEntity
entity
)
{
BizAgentApplicationCategoryModel
model
=
new
BizAgentApplicationCategoryModel
();
model
.
setId
(
entity
.
getId
());
model
.
setCategory
(
entity
.
getCategory
());
model
.
setCategoryTw
(
entity
.
getCategoryTw
());
model
.
setCategoryEn
(
entity
.
getCategoryEn
());
return
model
;
}
// public static BizAgentApplicationCategoryDto entityToDto(BizAgentApplicationCategoryEntity entity){
// BizAgentApplicationCategoryDto dto = new BizAgentApplicationCategoryDto();
// dto.setId(entity.getId());
// dto.setCategory(entity.getCategory());
// dto.setCategoryTw(entity.getCategoryTw());
// dto.setCategoryEn(entity.getCategoryEn());
// return dto;
// }
//
// public static BizAgentApplicationCategoryEntity dtoToEntity(BizAgentApplicationCategoryDto dto){
// BizAgentApplicationCategoryEntity entity = new BizAgentApplicationCategoryEntity();
// entity.setId(dto.getId());
// entity.setCategory(dto.getCategory());
// entity.setCategoryTw(dto.getCategoryTw());
// entity.setCategoryEn(dto.getCategoryEn());
// return entity;
// }
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/entity/BizAgentApplicationCategoryEntity.java
0 → 100644
View file @
cd9f9847
package
cn
.
com
.
poc
.
agent_application
.
entity
;
public
class
BizAgentApplicationCategoryEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Integer
id
;
public
java
.
lang
.
Integer
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Integer
id
){
this
.
id
=
id
;
}
/** category
*应用分类 【简体】
*/
private
java
.
lang
.
String
category
;
public
java
.
lang
.
String
getCategory
(){
return
this
.
category
;
}
public
void
setCategory
(
java
.
lang
.
String
category
){
this
.
category
=
category
;
}
/** category_tw
*应用分类 【繁体】
*/
private
java
.
lang
.
String
categoryTw
;
public
java
.
lang
.
String
getCategoryTw
(){
return
this
.
categoryTw
;
}
public
void
setCategoryTw
(
java
.
lang
.
String
categoryTw
){
this
.
categoryTw
=
categoryTw
;
}
/** category_en
*应用分类 【英文】
*/
private
java
.
lang
.
String
categoryEn
;
public
java
.
lang
.
String
getCategoryEn
(){
return
this
.
categoryEn
;
}
public
void
setCategoryEn
(
java
.
lang
.
String
categoryEn
){
this
.
categoryEn
=
categoryEn
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/model/BizAgentApplicationCategoryModel.java
0 → 100644
View file @
cd9f9847
package
cn
.
com
.
poc
.
agent_application
.
model
;
import
java.io.Serializable
;
import
cn.com.yict.framemax.data.model.BaseModelClass
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Id
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
/**
* Model class for biz_agent_application_category
* Agent应用分类
*/
@Entity
@Table
(
name
=
"biz_agent_application_category"
)
@DynamicInsert
@DynamicUpdate
public
class
BizAgentApplicationCategoryModel
extends
BaseModelClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Integer
id
;
@Column
(
name
=
"id"
,
length
=
10
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
public
java
.
lang
.
Integer
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Integer
id
){
this
.
id
=
id
;
super
.
addValidField
(
"id"
);
}
/** category
*应用分类 【简体】
*/
private
java
.
lang
.
String
category
;
@Column
(
name
=
"category"
,
length
=
100
)
public
java
.
lang
.
String
getCategory
(){
return
this
.
category
;
}
public
void
setCategory
(
java
.
lang
.
String
category
){
this
.
category
=
category
;
super
.
addValidField
(
"category"
);
}
/** category_tw
*应用分类 【繁体】
*/
private
java
.
lang
.
String
categoryTw
;
@Column
(
name
=
"category_tw"
,
length
=
100
)
public
java
.
lang
.
String
getCategoryTw
(){
return
this
.
categoryTw
;
}
public
void
setCategoryTw
(
java
.
lang
.
String
categoryTw
){
this
.
categoryTw
=
categoryTw
;
super
.
addValidField
(
"categoryTw"
);
}
/** category_en
*应用分类 【英文】
*/
private
java
.
lang
.
String
categoryEn
;
@Column
(
name
=
"category_en"
,
length
=
100
)
public
java
.
lang
.
String
getCategoryEn
(){
return
this
.
categoryEn
;
}
public
void
setCategoryEn
(
java
.
lang
.
String
categoryEn
){
this
.
categoryEn
=
categoryEn
;
super
.
addValidField
(
"categoryEn"
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/repository/BizAgentApplicationCategoryRepository.java
0 → 100644
View file @
cd9f9847
package
cn
.
com
.
poc
.
agent_application
.
repository
;
import
cn.com.yict.framemax.data.repository.Repository
;
import
cn.com.poc.agent_application.model.BizAgentApplicationCategoryModel
;
public
interface
BizAgentApplicationCategoryRepository
extends
Repository
<
BizAgentApplicationCategoryModel
,
java
.
lang
.
Integer
>
{
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/rest/BizAgentApplicationMallRest.java
View file @
cd9f9847
...
@@ -3,12 +3,16 @@ package cn.com.poc.agent_application.rest;
...
@@ -3,12 +3,16 @@ package cn.com.poc.agent_application.rest;
import
cn.com.yict.framemax.core.rest.BaseRest
;
import
cn.com.yict.framemax.core.rest.BaseRest
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationMallDto
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationMallDto
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
java.util.List
;
import
java.util.List
;
import
cn.com.yict.framemax.web.permission.Access
;
import
cn.com.yict.framemax.web.permission.Access
;
import
cn.com.yict.framemax.web.permission.Permission
;
import
cn.com.yict.framemax.web.permission.Permission
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
javax.servlet.http.HttpServletRequest
;
@Permission
(
value
=
Access
.
Safety
)
@Permission
(
value
=
Access
.
Safety
)
public
interface
BizAgentApplicationMallRest
extends
BaseRest
{
public
interface
BizAgentApplicationMallRest
extends
BaseRest
{
...
@@ -20,12 +24,12 @@ public interface BizAgentApplicationMallRest extends BaseRest {
...
@@ -20,12 +24,12 @@ public interface BizAgentApplicationMallRest extends BaseRest {
void
publishAgentToMall
(
@RequestBody
BizAgentApplicationMallDto
dto
)
throws
Exception
;
void
publishAgentToMall
(
@RequestBody
BizAgentApplicationMallDto
dto
)
throws
Exception
;
BizAgentApplicationMallDto
getById
(
@RequestParam
java
.
lang
.
Integer
id
)
throws
Exception
;
BizAgentApplicationMallDto
getById
(
@RequestParam
java
.
lang
.
Integer
id
)
throws
Exception
;
List
<
BizAgentApplicationMallDto
>
getListByExample
(
@RequestBody
BizAgentApplicationMallDto
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
List
<
BizAgentApplicationMallDto
>
getListByExample
(
@RequestBody
BizAgentApplicationMallDto
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
/**
/**
* 获取【应用广场】的应用列表
* 获取【应用广场】的应用列表
*
*
/
*/
List
<
BizAgentApplicationMallDto
>
getList
(
PagingInfo
pagingInfo
)
throws
Exception
;
List
<
BizAgentApplicationMallDto
>
getList
(
PagingInfo
pagingInfo
)
throws
Exception
;
BizAgentApplicationMallDto
update
(
@RequestBody
BizAgentApplicationMallDto
dto
)
throws
Exception
;
BizAgentApplicationMallDto
update
(
@RequestBody
BizAgentApplicationMallDto
dto
)
throws
Exception
;
...
@@ -36,14 +40,20 @@ public interface BizAgentApplicationMallRest extends BaseRest {
...
@@ -36,14 +40,20 @@ public interface BizAgentApplicationMallRest extends BaseRest {
* 收藏/取消收藏应用市场中的应用
* 收藏/取消收藏应用市场中的应用
*
*
* @param id 应用广场中的id
* @param id 应用广场中的id
*
*
/
*/
void
collectOrCancelAgentInMall
(
@RequestParam
Integer
id
)
throws
Exception
;
void
collectOrCancelAgentInMall
(
@RequestParam
Integer
id
)
throws
Exception
;
/**
/**
* 下架用户在应用市场中的应用
* 下架用户在应用市场中的应用
*
*
* @param agentPublishId 发布应用表的id
* @param agentPublishId 发布应用表的id
*
*
/
*/
void
unSaleAgentInMall
(
@RequestParam
Integer
agentPublishId
)
throws
Exception
;
void
unSaleAgentInMall
(
@RequestParam
Integer
agentPublishId
)
throws
Exception
;
/**
* 获取应用广场分类列表
*/
List
<
String
>
getMallCategoryList
(
HttpServletRequest
httpServletRequest
)
throws
Exception
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/rest/impl/BizAgentApplicationMallRestImpl.java
View file @
cd9f9847
...
@@ -3,13 +3,19 @@ package cn.com.poc.agent_application.rest.impl;
...
@@ -3,13 +3,19 @@ package cn.com.poc.agent_application.rest.impl;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
cn.com.poc.agent_application.aggregate.AgentApplicationMallService
;
import
cn.com.poc.agent_application.aggregate.AgentApplicationMallService
;
import
cn.com.poc.agent_application.convert.BizAgentApplicationCategoryConvert
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationCategoryEntity
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationPublishEntity
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationPublishEntity
;
import
cn.com.poc.agent_application.entity.BizMemberAgentApplicationCollectEntity
;
import
cn.com.poc.agent_application.entity.BizMemberAgentApplicationCollectEntity
;
import
cn.com.poc.agent_application.service.BizAgentApplicationCategoryService
;
import
cn.com.poc.agent_application.service.BizAgentApplicationPublishService
;
import
cn.com.poc.agent_application.service.BizAgentApplicationPublishService
;
import
cn.com.poc.agent_application.service.BizMemberAgentApplicationCollectService
;
import
cn.com.poc.agent_application.service.BizMemberAgentApplicationCollectService
;
import
cn.com.poc.common.constant.CommonConstant
;
import
cn.com.poc.common.constant.CommonConstant
;
import
cn.com.poc.common.constant.XLangConstant
;
import
cn.com.poc.common.utils.StringUtils
;
import
cn.com.yict.framemax.core.exception.BusinessException
;
import
cn.com.yict.framemax.core.exception.BusinessException
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
cn.com.poc.agent_application.rest.BizAgentApplicationMallRest
;
import
cn.com.poc.agent_application.rest.BizAgentApplicationMallRest
;
...
@@ -36,6 +42,9 @@ public class BizAgentApplicationMallRestImpl implements BizAgentApplicationMallR
...
@@ -36,6 +42,9 @@ public class BizAgentApplicationMallRestImpl implements BizAgentApplicationMallR
@Resource
@Resource
private
BizAgentApplicationMallService
bizAgentApplicationMallService
;
private
BizAgentApplicationMallService
bizAgentApplicationMallService
;
@Resource
private
BizAgentApplicationCategoryService
bizAgentApplicationCategoryService
;
@Override
@Override
public
void
publishAgentToMall
(
BizAgentApplicationMallDto
dto
)
throws
Exception
{
public
void
publishAgentToMall
(
BizAgentApplicationMallDto
dto
)
throws
Exception
{
...
@@ -130,4 +139,28 @@ public class BizAgentApplicationMallRestImpl implements BizAgentApplicationMallR
...
@@ -130,4 +139,28 @@ public class BizAgentApplicationMallRestImpl implements BizAgentApplicationMallR
mallEntity
.
setIsSale
(
CommonConstant
.
IsDeleted
.
N
);
mallEntity
.
setIsSale
(
CommonConstant
.
IsDeleted
.
N
);
bizAgentApplicationMallService
.
update
(
mallEntity
);
bizAgentApplicationMallService
.
update
(
mallEntity
);
}
}
@Override
public
List
<
String
>
getMallCategoryList
(
HttpServletRequest
httpServletRequest
)
throws
Exception
{
List
<
String
>
result
=
new
ArrayList
<>();
String
lang
=
httpServletRequest
.
getHeader
(
"x-lang"
);
if
(
StringUtils
.
isEmpty
(
lang
))
{
lang
=
XLangConstant
.
ZH_CN
;
}
List
<
BizAgentApplicationCategoryEntity
>
bizAgentApplicationCategoryEntities
=
bizAgentApplicationCategoryService
.
findByExample
(
new
BizAgentApplicationCategoryEntity
(),
null
);
for
(
BizAgentApplicationCategoryEntity
entity
:
bizAgentApplicationCategoryEntities
)
{
switch
(
lang
)
{
case
XLangConstant
.
EN
:
result
.
add
(
entity
.
getCategoryEn
());
break
;
case
XLangConstant
.
ZH_CN
:
result
.
add
(
entity
.
getCategory
());
break
;
case
XLangConstant
.
ZH_TW
:
result
.
add
(
entity
.
getCategoryTw
());
break
;
}
}
return
result
;
}
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/service/BizAgentApplicationCategoryService.java
0 → 100644
View file @
cd9f9847
package
cn
.
com
.
poc
.
agent_application
.
service
;
import
cn.com.yict.framemax.core.service.BaseService
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationCategoryEntity
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
java.util.Collection
;
import
java.util.List
;
public
interface
BizAgentApplicationCategoryService
extends
BaseService
{
BizAgentApplicationCategoryEntity
get
(
java
.
lang
.
Integer
id
)
throws
Exception
;
List
<
BizAgentApplicationCategoryEntity
>
findByExample
(
BizAgentApplicationCategoryEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
BizAgentApplicationCategoryEntity
save
(
BizAgentApplicationCategoryEntity
entity
)
throws
Exception
;
BizAgentApplicationCategoryEntity
update
(
BizAgentApplicationCategoryEntity
entity
)
throws
Exception
;
void
deletedById
(
java
.
lang
.
Integer
id
)
throws
Exception
;
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/service/impl/BizAgentApplicationCategoryServiceImpl.java
0 → 100644
View file @
cd9f9847
package
cn
.
com
.
poc
.
agent_application
.
service
.
impl
;
import
cn.com.yict.framemax.core.service.impl.BaseServiceImpl
;
import
cn.com.poc.agent_application.service.BizAgentApplicationCategoryService
;
import
cn.com.poc.agent_application.model.BizAgentApplicationCategoryModel
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationCategoryEntity
;
import
cn.com.poc.agent_application.convert.BizAgentApplicationCategoryConvert
;
import
cn.com.poc.agent_application.repository.BizAgentApplicationCategoryRepository
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
org.springframework.stereotype.Service
;
import
org.apache.commons.collections4.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.stream.Collectors
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.util.Assert
;
@Service
public
class
BizAgentApplicationCategoryServiceImpl
extends
BaseServiceImpl
implements
BizAgentApplicationCategoryService
{
@Resource
private
BizAgentApplicationCategoryRepository
repository
;
public
BizAgentApplicationCategoryEntity
get
(
java
.
lang
.
Integer
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizAgentApplicationCategoryModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
==
null
){
return
null
;
}
return
BizAgentApplicationCategoryConvert
.
modelToEntity
(
model
);
}
public
List
<
BizAgentApplicationCategoryEntity
>
findByExample
(
BizAgentApplicationCategoryEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
{
List
<
BizAgentApplicationCategoryEntity
>
result
=
new
ArrayList
<
BizAgentApplicationCategoryEntity
>();
BizAgentApplicationCategoryModel
model
=
new
BizAgentApplicationCategoryModel
();
if
(
example
!=
null
){
model
=
BizAgentApplicationCategoryConvert
.
entityToModel
(
example
);
}
List
<
BizAgentApplicationCategoryModel
>
models
=
this
.
repository
.
findByExample
(
model
,
pagingInfo
);
if
(
CollectionUtils
.
isNotEmpty
(
models
))
{
result
=
models
.
stream
().
map
(
BizAgentApplicationCategoryConvert:
:
modelToEntity
).
collect
(
Collectors
.
toList
());
}
return
result
;
}
public
BizAgentApplicationCategoryEntity
save
(
BizAgentApplicationCategoryEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
entity
.
setId
(
null
);
BizAgentApplicationCategoryModel
model
=
BizAgentApplicationCategoryConvert
.
entityToModel
(
entity
);
BizAgentApplicationCategoryModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizAgentApplicationCategoryConvert
.
modelToEntity
(
saveModel
);
}
public
BizAgentApplicationCategoryEntity
update
(
BizAgentApplicationCategoryEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
Assert
.
notNull
(
entity
.
getId
(),
"update pk can not be null"
);
BizAgentApplicationCategoryModel
model
=
this
.
repository
.
get
(
entity
.
getId
());
if
(
entity
.
getCategory
()
!=
null
){
model
.
setCategory
(
entity
.
getCategory
());
}
if
(
entity
.
getCategoryTw
()
!=
null
){
model
.
setCategoryTw
(
entity
.
getCategoryTw
());
}
if
(
entity
.
getCategoryEn
()
!=
null
){
model
.
setCategoryEn
(
entity
.
getCategoryEn
());
}
BizAgentApplicationCategoryModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizAgentApplicationCategoryConvert
.
modelToEntity
(
saveModel
);
}
public
void
deletedById
(
java
.
lang
.
Integer
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizAgentApplicationCategoryModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
!=
null
){
}
}
}
\ No newline at end of file
src/main/java/cn/com/poc/common/constant/XLangConstant.java
0 → 100644
View file @
cd9f9847
package
cn
.
com
.
poc
.
common
.
constant
;
/**
* I18N常量
*/
public
interface
XLangConstant
{
String
ZH_CN
=
"zh_cn"
;
String
ZH_TW
=
"zh_tw"
;
String
EN
=
"en"
;
}
src/test/java/cn/com/poc/AgentApplicationInfoTest.java
View file @
cd9f9847
...
@@ -3,8 +3,11 @@ package cn.com.poc;
...
@@ -3,8 +3,11 @@ package cn.com.poc;
import
cn.com.poc.agent_application.aggregate.AgentApplicationInfoService
;
import
cn.com.poc.agent_application.aggregate.AgentApplicationInfoService
;
import
cn.com.poc.common.service.RedisService
;
import
cn.com.poc.common.service.RedisService
;
import
cn.com.poc.common.utils.BlContext
;
import
cn.com.poc.expose.aggregate.AgentApplicationService
;
import
cn.com.poc.expose.aggregate.AgentApplicationService
;
import
cn.com.poc.thirdparty.resource.demand.ai.aggregate.DemandKnowledgeService
;
import
cn.com.poc.thirdparty.resource.demand.ai.aggregate.DemandKnowledgeService
;
import
cn.com.poc.thirdparty.resource.demand.ai.function.long_memory.SetLongMemoryConstants
;
import
cn.com.poc.thirdparty.resource.demand.ai.function.value_memory.SetValueMemoryConstants
;
import
cn.com.yict.framemax.core.spring.SingleContextInitializer
;
import
cn.com.yict.framemax.core.spring.SingleContextInitializer
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
org.apache.commons.collections4.ListUtils
;
import
org.apache.commons.collections4.ListUtils
;
...
@@ -35,12 +38,19 @@ public class AgentApplicationInfoTest {
...
@@ -35,12 +38,19 @@ public class AgentApplicationInfoTest {
@Resource
@Resource
private
RedisService
redisService
;
private
RedisService
redisService
;
@Test
public
void
del
(){
String
contentKey
=
SetValueMemoryConstants
.
REDIS_PREFIX
;
redisService
.
del
(
contentKey
);
}
/**
/**
* Agent 应
用标题,描述生成
* Agent Ӧ
�ñ��⣬��������
*/
*/
@Test
@Test
public
void
createAgentTitleAndDesc
()
{
public
void
createAgentTitleAndDesc
()
{
String
input
=
"
测试标题
"
;
String
input
=
"
���Ա���"
;
System
.
out
.
println
(
applicationInfoService
.
createAgentTitleAndDesc
(
input
));
System
.
out
.
println
(
applicationInfoService
.
createAgentTitleAndDesc
(
input
));
}
}
...
...
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