Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elleai
Project
Project
Details
Activity
Releases
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
ai-tech
E
ellehuis-group
backend
elleai
Commits
66c3f577
Commit
66c3f577
authored
Oct 18, 2024
by
陈立彬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口调整
parent
a9fe6b05
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
268 additions
and
99 deletions
+268
-99
CommonRequestDto.java
...eeze/elleai/application/dto/request/CommonRequestDto.java
+20
-0
ExamineSceneCategoryRequestDto.java
...plication/dto/request/ExamineSceneCategoryRequestDto.java
+2
-2
ExamineSceneCategorySaveDto.java
.../application/dto/request/ExamineSceneCategorySaveDto.java
+4
-6
ProperNounRequestDto.java
.../elleai/application/dto/request/ProperNounRequestDto.java
+2
-2
ProperNounSaveDto.java
...eze/elleai/application/dto/request/ProperNounSaveDto.java
+4
-6
QaAssistantSaveDto.java
...ze/elleai/application/dto/request/QaAssistantSaveDto.java
+7
-12
UserQaHistoryMobileRequestDto.java
...pplication/dto/request/UserQaHistoryMobileRequestDto.java
+2
-2
UserQaHistoryRequestDto.java
...leai/application/dto/request/UserQaHistoryRequestDto.java
+2
-2
AppRoleDto.java
...cn/breeze/elleai/application/dto/response/AppRoleDto.java
+13
-0
ExamineRecordDto.java
...eze/elleai/application/dto/response/ExamineRecordDto.java
+14
-0
ExamineSceneCategoryDto.java
...eai/application/dto/response/ExamineSceneCategoryDto.java
+4
-15
KnowledgeDataBaseCategoryDto.java
...pplication/dto/response/KnowledgeDataBaseCategoryDto.java
+16
-0
ProperNounDto.java
...breeze/elleai/application/dto/response/ProperNounDto.java
+6
-10
QaAssistantDto.java
...reeze/elleai/application/dto/response/QaAssistantDto.java
+7
-12
AppChatCompletionService.java
.../elleai/application/service/AppChatCompletionService.java
+17
-0
AppCommonService.java
...n/breeze/elleai/application/service/AppCommonService.java
+47
-1
AppExamineService.java
.../breeze/elleai/application/service/AppExamineService.java
+55
-0
CommonController.java
...a/cn/breeze/elleai/controller/admin/CommonController.java
+20
-1
ExamineController.java
.../cn/breeze/elleai/controller/admin/ExamineController.java
+2
-2
ExamineMobileController.java
...eeze/elleai/controller/front/ExamineMobileController.java
+1
-1
ProperNounSaveModel.java
...ai/domain/sparring/model/request/ProperNounSaveModel.java
+4
-6
QaAssistantSaveModel.java
...i/domain/sparring/model/request/QaAssistantSaveModel.java
+2
-2
ProperNounResponseModel.java
...main/sparring/model/response/ProperNounResponseModel.java
+1
-1
QaAssistantResponseModel.java
...ain/sparring/model/response/QaAssistantResponseModel.java
+2
-2
ChatCompletionServiceImpl.java
...ai/domain/sparring/service/ChatCompletionServiceImpl.java
+1
-1
CommonServiceImpl.java
...eze/elleai/domain/sparring/service/CommonServiceImpl.java
+1
-1
ExamineServiceImpl.java
...ze/elleai/domain/sparring/service/ExamineServiceImpl.java
+6
-6
ProperNounEntity.java
.../java/cn/breeze/elleai/infra/entity/ProperNounEntity.java
+1
-1
QaAssistantEntity.java
...java/cn/breeze/elleai/infra/entity/QaAssistantEntity.java
+2
-2
ProperNounTableDef.java
.../breeze/elleai/infra/entity/table/ProperNounTableDef.java
+1
-1
QaAssistantTableDef.java
...breeze/elleai/infra/entity/table/QaAssistantTableDef.java
+2
-2
No files found.
src/main/java/cn/breeze/elleai/application/dto/request/CommonRequestDto.java
0 → 100644
View file @
66c3f577
package
cn
.
breeze
.
elleai
.
application
.
dto
.
request
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
CommonRequestDto
implements
Serializable
{
@Schema
(
description
=
"页码"
)
@JsonProperty
(
"page_no"
)
private
Integer
pageNo
=
1
;
@Schema
(
description
=
"分页数量"
)
@JsonProperty
(
"page_size"
)
private
Integer
pageSize
=
10
;
}
src/main/java/cn/breeze/elleai/application/dto/request/ExamineSceneCategoryRequestDto.java
View file @
66c3f577
...
@@ -12,11 +12,11 @@ public class ExamineSceneCategoryRequestDto implements Serializable {
...
@@ -12,11 +12,11 @@ public class ExamineSceneCategoryRequestDto implements Serializable {
@Schema
(
description
=
"页码"
)
@Schema
(
description
=
"页码"
)
@JsonProperty
(
"page_no"
)
@JsonProperty
(
"page_no"
)
private
Integer
pageNo
;
private
Integer
pageNo
=
1
;
@Schema
(
description
=
"分页数量"
)
@Schema
(
description
=
"分页数量"
)
@JsonProperty
(
"page_size"
)
@JsonProperty
(
"page_size"
)
private
Integer
pageSize
;
private
Integer
pageSize
=
10
;
@Schema
(
description
=
"场景分类名称"
)
@Schema
(
description
=
"场景分类名称"
)
private
String
name
;
private
String
name
;
...
...
src/main/java/cn/breeze/elleai/application/dto/request/ExamineSceneCategorySaveDto.java
View file @
66c3f577
...
@@ -6,6 +6,7 @@ import lombok.Data;
...
@@ -6,6 +6,7 @@ import lombok.Data;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
@Data
@Data
public
class
ExamineSceneCategorySaveDto
implements
Serializable
{
public
class
ExamineSceneCategorySaveDto
implements
Serializable
{
...
@@ -26,12 +27,9 @@ public class ExamineSceneCategorySaveDto implements Serializable {
...
@@ -26,12 +27,9 @@ public class ExamineSceneCategorySaveDto implements Serializable {
@JsonProperty
(
"scene_id"
)
@JsonProperty
(
"scene_id"
)
private
Integer
sceneId
;
private
Integer
sceneId
;
/**
@Schema
(
description
=
"可见角色列表"
)
* 可见角色IDS
@JsonProperty
(
"visible_role_list"
)
*/
private
List
<
String
>
visibleRoleList
;
@Schema
(
description
=
"可见角色IDS,逗号分隔"
)
@JsonProperty
(
"visible_role_ids"
)
private
String
visibleRoleIds
;
/**
/**
* 分类描述
* 分类描述
...
...
src/main/java/cn/breeze/elleai/application/dto/request/ProperNounRequestDto.java
View file @
66c3f577
...
@@ -11,11 +11,11 @@ public class ProperNounRequestDto implements Serializable {
...
@@ -11,11 +11,11 @@ public class ProperNounRequestDto implements Serializable {
@Schema
(
description
=
"页码"
)
@Schema
(
description
=
"页码"
)
@JsonProperty
(
"page_no"
)
@JsonProperty
(
"page_no"
)
private
Integer
pageNo
;
private
Integer
pageNo
=
1
;
@Schema
(
description
=
"分页数量"
)
@Schema
(
description
=
"分页数量"
)
@JsonProperty
(
"page_size"
)
@JsonProperty
(
"page_size"
)
private
Integer
pageSize
;
private
Integer
pageSize
=
10
;
@Schema
(
description
=
"专有名词名称"
)
@Schema
(
description
=
"专有名词名称"
)
private
String
name
;
private
String
name
;
...
...
src/main/java/cn/breeze/elleai/application/dto/request/ProperNounSaveDto.java
View file @
66c3f577
...
@@ -6,6 +6,7 @@ import lombok.Data;
...
@@ -6,6 +6,7 @@ import lombok.Data;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
@Data
@Data
public
class
ProperNounSaveDto
implements
Serializable
{
public
class
ProperNounSaveDto
implements
Serializable
{
...
@@ -19,12 +20,9 @@ public class ProperNounSaveDto implements Serializable {
...
@@ -19,12 +20,9 @@ public class ProperNounSaveDto implements Serializable {
@Schema
(
description
=
"专有名词名称"
)
@Schema
(
description
=
"专有名词名称"
)
private
String
name
;
private
String
name
;
/**
@Schema
(
description
=
"相似词列表"
)
* 相似词,以逗号分隔
@JsonProperty
(
"similar_word_list"
)
*/
private
List
<
String
>
similarWordList
;
@Schema
(
description
=
"相似词,逗号分隔"
)
@JsonProperty
(
"similar_words"
)
private
String
similarWords
;
/**
/**
* 状态(0禁用 1启用)
* 状态(0禁用 1启用)
...
...
src/main/java/cn/breeze/elleai/application/dto/request/QaAssistantSaveDto.java
View file @
66c3f577
...
@@ -5,6 +5,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
...
@@ -5,6 +5,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
@Data
@Data
public
class
QaAssistantSaveDto
implements
Serializable
{
public
class
QaAssistantSaveDto
implements
Serializable
{
...
@@ -31,18 +32,12 @@ public class QaAssistantSaveDto implements Serializable {
...
@@ -31,18 +32,12 @@ public class QaAssistantSaveDto implements Serializable {
@JsonProperty
(
"icon_url"
)
@JsonProperty
(
"icon_url"
)
private
String
iconUrl
;
private
String
iconUrl
;
/**
@Schema
(
description
=
"知识库分类ID列表"
)
* 知识库分类IDS,以逗号分隔
@JsonProperty
(
"category_id_list"
)
*/
private
List
<
String
>
categoryIdList
;
@Schema
(
description
=
"知识库分类IDS,逗号分隔"
)
@JsonProperty
(
"category_ids"
)
private
String
categoryIds
;
/**
@Schema
(
description
=
"可见角色列表"
)
* 可见角色IDS,以逗号分隔
@JsonProperty
(
"visible_role_list"
)
*/
private
List
<
String
>
visibleRoleList
;
@Schema
(
description
=
"可见角色IDS,逗号分隔"
)
@JsonProperty
(
"visible_role_ids"
)
private
String
visibleRoleIds
;
}
}
src/main/java/cn/breeze/elleai/application/dto/request/UserQaHistoryMobileRequestDto.java
View file @
66c3f577
...
@@ -11,11 +11,11 @@ public class UserQaHistoryMobileRequestDto implements Serializable {
...
@@ -11,11 +11,11 @@ public class UserQaHistoryMobileRequestDto implements Serializable {
@Schema
(
description
=
"页码"
)
@Schema
(
description
=
"页码"
)
@JsonProperty
(
"page_no"
)
@JsonProperty
(
"page_no"
)
private
Integer
pageNo
;
private
Integer
pageNo
=
1
;
@Schema
(
description
=
"分页数量"
)
@Schema
(
description
=
"分页数量"
)
@JsonProperty
(
"page_size"
)
@JsonProperty
(
"page_size"
)
private
Integer
pageSize
;
private
Integer
pageSize
=
10
;
@Schema
(
description
=
"用户ID"
)
@Schema
(
description
=
"用户ID"
)
@JsonProperty
(
"user_id"
)
@JsonProperty
(
"user_id"
)
...
...
src/main/java/cn/breeze/elleai/application/dto/request/UserQaHistoryRequestDto.java
View file @
66c3f577
...
@@ -11,9 +11,9 @@ public class UserQaHistoryRequestDto implements Serializable {
...
@@ -11,9 +11,9 @@ public class UserQaHistoryRequestDto implements Serializable {
@Schema
(
description
=
"页码"
)
@Schema
(
description
=
"页码"
)
@JsonProperty
(
"page_no"
)
@JsonProperty
(
"page_no"
)
private
Integer
pageNo
;
private
Integer
pageNo
=
1
;
@Schema
(
description
=
"分页数量"
)
@Schema
(
description
=
"分页数量"
)
@JsonProperty
(
"page_size"
)
@JsonProperty
(
"page_size"
)
private
Integer
pageSize
;
private
Integer
pageSize
=
10
;
}
}
src/main/java/cn/breeze/elleai/application/dto/response/AppRoleDto.java
0 → 100644
View file @
66c3f577
package
cn
.
breeze
.
elleai
.
application
.
dto
.
response
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
AppRoleDto
implements
Serializable
{
@Schema
(
description
=
"名称"
)
private
String
name
;
}
src/main/java/cn/breeze/elleai/application/dto/response/ExamineRecordDto.java
View file @
66c3f577
...
@@ -23,6 +23,13 @@ public class ExamineRecordDto implements Serializable {
...
@@ -23,6 +23,13 @@ public class ExamineRecordDto implements Serializable {
@JsonProperty
(
"user_id"
)
@JsonProperty
(
"user_id"
)
private
String
userId
;
private
String
userId
;
/**
* 用户名称
*/
@Schema
(
description
=
"用户名称"
)
@JsonProperty
(
"user_name"
)
private
String
userName
;
/**
/**
* 会话ID
* 会话ID
*/
*/
...
@@ -59,6 +66,13 @@ public class ExamineRecordDto implements Serializable {
...
@@ -59,6 +66,13 @@ public class ExamineRecordDto implements Serializable {
@JsonProperty
(
"answered_num"
)
@JsonProperty
(
"answered_num"
)
private
Integer
answeredNum
;
private
Integer
answeredNum
;
/**
* 题目总数
*/
@Schema
(
description
=
"题目总数"
)
@JsonProperty
(
"qaNum"
)
private
Integer
qaNum
;
/**
/**
* 综合评分
* 综合评分
*/
*/
...
...
src/main/java/cn/breeze/elleai/application/dto/response/ExamineSceneCategoryDto.java
View file @
66c3f577
...
@@ -7,6 +7,7 @@ import lombok.Data;
...
@@ -7,6 +7,7 @@ import lombok.Data;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
@Data
@Data
public
class
ExamineSceneCategoryDto
implements
Serializable
{
public
class
ExamineSceneCategoryDto
implements
Serializable
{
...
@@ -34,19 +35,9 @@ public class ExamineSceneCategoryDto implements Serializable {
...
@@ -34,19 +35,9 @@ public class ExamineSceneCategoryDto implements Serializable {
@JsonProperty
(
"scene_name"
)
@JsonProperty
(
"scene_name"
)
private
String
sceneName
;
private
String
sceneName
;
/**
@Schema
(
description
=
"可见角色列表"
)
* 可见角色IDS
@JsonProperty
(
"visible_role_list"
)
*/
private
List
<
String
>
visibleRoleList
;
@Schema
(
description
=
"可见角色IDS,逗号分隔"
)
@JsonProperty
(
"visible_role_ids"
)
private
String
visibleRoleIds
;
/**
* 可见角色名称S
*/
@Schema
(
description
=
"可见角色名称S,逗号分隔"
)
@JsonProperty
(
"visible_role_names"
)
private
String
visibleRoleNames
;
/**
/**
* 分类描述
* 分类描述
...
@@ -64,7 +55,6 @@ public class ExamineSceneCategoryDto implements Serializable {
...
@@ -64,7 +55,6 @@ public class ExamineSceneCategoryDto implements Serializable {
*/
*/
@Schema
(
description
=
"创建时间"
)
@Schema
(
description
=
"创建时间"
)
@JsonProperty
(
"create_time"
)
@JsonProperty
(
"create_time"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
private
Date
createTime
;
/**
/**
...
@@ -72,7 +62,6 @@ public class ExamineSceneCategoryDto implements Serializable {
...
@@ -72,7 +62,6 @@ public class ExamineSceneCategoryDto implements Serializable {
*/
*/
@Schema
(
description
=
"更新时间"
)
@Schema
(
description
=
"更新时间"
)
@JsonProperty
(
"update_time"
)
@JsonProperty
(
"update_time"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
updateTime
;
private
Date
updateTime
;
/**
/**
...
...
src/main/java/cn/breeze/elleai/application/dto/response/KnowledgeDataBaseCategoryDto.java
0 → 100644
View file @
66c3f577
package
cn
.
breeze
.
elleai
.
application
.
dto
.
response
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
KnowledgeDataBaseCategoryDto
implements
Serializable
{
@Schema
(
description
=
"ID"
)
private
Integer
id
;
@Schema
(
description
=
"名称"
)
private
String
name
;
}
src/main/java/cn/breeze/elleai/application/dto/response/ProperNounDto.java
View file @
66c3f577
...
@@ -2,10 +2,13 @@ package cn.breeze.elleai.application.dto.response;
...
@@ -2,10 +2,13 @@ package cn.breeze.elleai.application.dto.response;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
@Data
@Data
public
class
ProperNounDto
implements
Serializable
{
public
class
ProperNounDto
implements
Serializable
{
...
@@ -17,22 +20,15 @@ public class ProperNounDto implements Serializable {
...
@@ -17,22 +20,15 @@ public class ProperNounDto implements Serializable {
*/
*/
private
String
name
;
private
String
name
;
/**
@Schema
(
description
=
"相似词列表"
)
* 相似词,以逗号分隔
@JsonProperty
(
"similar_word_list"
)
*/
private
List
<
String
>
similarWordList
=
new
ArrayList
<>();
@JsonProperty
(
"similar_words"
)
private
String
similarWords
;
/**
/**
* 状态(0禁用 1启用)
* 状态(0禁用 1启用)
*/
*/
private
Integer
status
;
private
Integer
status
;
/**
* 是否删除(0否 1是)
*/
private
Integer
deleted
;
/**
/**
* 创建时间
* 创建时间
*/
*/
...
...
src/main/java/cn/breeze/elleai/application/dto/response/QaAssistantDto.java
View file @
66c3f577
...
@@ -6,6 +6,7 @@ import lombok.Data;
...
@@ -6,6 +6,7 @@ import lombok.Data;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
@Data
@Data
public
class
QaAssistantDto
implements
Serializable
{
public
class
QaAssistantDto
implements
Serializable
{
...
@@ -32,19 +33,13 @@ public class QaAssistantDto implements Serializable {
...
@@ -32,19 +33,13 @@ public class QaAssistantDto implements Serializable {
@JsonProperty
(
"icon_url"
)
@JsonProperty
(
"icon_url"
)
private
String
iconUrl
;
private
String
iconUrl
;
/**
@Schema
(
description
=
"知识库分类ID列表"
)
* 知识库分类IDS,以逗号分隔
@JsonProperty
(
"category_id_list"
)
*/
private
List
<
String
>
categoryIdList
;
@Schema
(
description
=
"知识库分类IDS,逗号分隔"
)
@JsonProperty
(
"category_ids"
)
private
String
categoryIds
;
/**
@Schema
(
description
=
"可见角色列表"
)
* 可见角色IDS,以逗号分隔
@JsonProperty
(
"visible_role_list"
)
*/
private
List
<
String
>
visibleRoleList
;
@Schema
(
description
=
"可见角色IDS,逗号分隔"
)
@JsonProperty
(
"visible_role_ids"
)
private
String
visibleRoleIds
;
/**
/**
* 状态(0禁用 1启用)
* 状态(0禁用 1启用)
...
...
src/main/java/cn/breeze/elleai/application/service/AppChatCompletionService.java
View file @
66c3f577
...
@@ -14,6 +14,7 @@ import cn.breeze.elleai.domain.sparring.service.ChatCompletionService;
...
@@ -14,6 +14,7 @@ import cn.breeze.elleai.domain.sparring.service.ChatCompletionService;
import
cn.breeze.elleai.util.UserPrincipal
;
import
cn.breeze.elleai.util.UserPrincipal
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mybatisflex.core.paginate.Page
;
import
com.mybatisflex.core.paginate.Page
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
...
@@ -86,6 +87,8 @@ public class AppChatCompletionService {
...
@@ -86,6 +87,8 @@ public class AppChatCompletionService {
public
void
saveQaAssistant
(
QaAssistantSaveDto
dto
)
{
public
void
saveQaAssistant
(
QaAssistantSaveDto
dto
)
{
QaAssistantSaveModel
model
=
BeanUtil
.
copyProperties
(
dto
,
QaAssistantSaveModel
.
class
);
QaAssistantSaveModel
model
=
BeanUtil
.
copyProperties
(
dto
,
QaAssistantSaveModel
.
class
);
model
.
setCategoryIds
(
JSONObject
.
toJSONString
(
dto
.
getCategoryIdList
()));
model
.
setVisibleRoleIds
(
JSONObject
.
toJSONString
(
dto
.
getVisibleRoleList
()));
chatCompletionService
.
saveQaAssistant
(
model
);
chatCompletionService
.
saveQaAssistant
(
model
);
}
}
...
@@ -106,6 +109,13 @@ public class AppChatCompletionService {
...
@@ -106,6 +109,13 @@ public class AppChatCompletionService {
if
(
CollectionUtil
.
isNotEmpty
(
page
.
getRecords
()))
{
if
(
CollectionUtil
.
isNotEmpty
(
page
.
getRecords
()))
{
List
<
QaAssistantDto
>
dtoList
=
page
.
getRecords
().
stream
().
map
(
v
->
{
List
<
QaAssistantDto
>
dtoList
=
page
.
getRecords
().
stream
().
map
(
v
->
{
QaAssistantDto
dto
=
BeanUtil
.
copyProperties
(
v
,
QaAssistantDto
.
class
);
QaAssistantDto
dto
=
BeanUtil
.
copyProperties
(
v
,
QaAssistantDto
.
class
);
if
(
StrUtil
.
isNotEmpty
(
v
.
getCategoryIds
()))
{
dto
.
setCategoryIdList
(
JSONObject
.
parseArray
(
v
.
getCategoryIds
(),
String
.
class
));
}
if
(
StrUtil
.
isNotEmpty
(
v
.
getVisibleRoleIds
()))
{
dto
.
setVisibleRoleList
(
JSONObject
.
parseArray
(
v
.
getVisibleRoleIds
(),
String
.
class
));
}
return
dto
;
return
dto
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
...
@@ -131,6 +141,13 @@ public class AppChatCompletionService {
...
@@ -131,6 +141,13 @@ public class AppChatCompletionService {
if
(
CollectionUtil
.
isNotEmpty
(
modelList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
modelList
))
{
resultList
=
modelList
.
stream
().
map
(
v
->
{
resultList
=
modelList
.
stream
().
map
(
v
->
{
QaAssistantDto
dto
=
BeanUtil
.
copyProperties
(
v
,
QaAssistantDto
.
class
);
QaAssistantDto
dto
=
BeanUtil
.
copyProperties
(
v
,
QaAssistantDto
.
class
);
if
(
StrUtil
.
isNotEmpty
(
v
.
getCategoryIds
()))
{
dto
.
setCategoryIdList
(
JSONObject
.
parseArray
(
v
.
getCategoryIds
(),
String
.
class
));
}
if
(
StrUtil
.
isNotEmpty
(
v
.
getVisibleRoleIds
()))
{
dto
.
setVisibleRoleList
(
JSONObject
.
parseArray
(
v
.
getVisibleRoleIds
(),
String
.
class
));
}
return
dto
;
return
dto
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
}
}
...
...
src/main/java/cn/breeze/elleai/application/service/AppCommonService.java
View file @
66c3f577
...
@@ -3,6 +3,8 @@ package cn.breeze.elleai.application.service;
...
@@ -3,6 +3,8 @@ package cn.breeze.elleai.application.service;
import
cn.breeze.elleai.application.dto.PageResult
;
import
cn.breeze.elleai.application.dto.PageResult
;
import
cn.breeze.elleai.application.dto.request.ProperNounRequestDto
;
import
cn.breeze.elleai.application.dto.request.ProperNounRequestDto
;
import
cn.breeze.elleai.application.dto.request.ProperNounSaveDto
;
import
cn.breeze.elleai.application.dto.request.ProperNounSaveDto
;
import
cn.breeze.elleai.application.dto.response.AppRoleDto
;
import
cn.breeze.elleai.application.dto.response.KnowledgeDataBaseCategoryDto
;
import
cn.breeze.elleai.application.dto.response.ProperNounDto
;
import
cn.breeze.elleai.application.dto.response.ProperNounDto
;
import
cn.breeze.elleai.domain.sparring.model.request.ProperNounRequestModel
;
import
cn.breeze.elleai.domain.sparring.model.request.ProperNounRequestModel
;
import
cn.breeze.elleai.domain.sparring.model.request.ProperNounSaveModel
;
import
cn.breeze.elleai.domain.sparring.model.request.ProperNounSaveModel
;
...
@@ -10,10 +12,14 @@ import cn.breeze.elleai.domain.sparring.model.response.ProperNounResponseModel;
...
@@ -10,10 +12,14 @@ import cn.breeze.elleai.domain.sparring.model.response.ProperNounResponseModel;
import
cn.breeze.elleai.domain.sparring.service.CommonService
;
import
cn.breeze.elleai.domain.sparring.service.CommonService
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mybatisflex.core.paginate.Page
;
import
com.mybatisflex.core.paginate.Page
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -52,7 +58,11 @@ public class AppCommonService {
...
@@ -52,7 +58,11 @@ public class AppCommonService {
*/
*/
public
ProperNounDto
properNounDetail
(
Integer
id
)
{
public
ProperNounDto
properNounDetail
(
Integer
id
)
{
ProperNounResponseModel
model
=
commonService
.
properNounDetail
(
id
);
ProperNounResponseModel
model
=
commonService
.
properNounDetail
(
id
);
return
BeanUtil
.
copyProperties
(
model
,
ProperNounDto
.
class
);
ProperNounDto
result
=
BeanUtil
.
copyProperties
(
model
,
ProperNounDto
.
class
);
if
(
StrUtil
.
isNotEmpty
(
model
.
getSimilarWords
()))
{
result
.
setSimilarWordList
(
JSONObject
.
parseArray
(
model
.
getSimilarWords
(),
String
.
class
));
}
return
result
;
}
}
...
@@ -63,6 +73,7 @@ public class AppCommonService {
...
@@ -63,6 +73,7 @@ public class AppCommonService {
public
void
saveproperNoun
(
ProperNounSaveDto
dto
)
{
public
void
saveproperNoun
(
ProperNounSaveDto
dto
)
{
ProperNounSaveModel
model
=
BeanUtil
.
copyProperties
(
dto
,
ProperNounSaveModel
.
class
);
ProperNounSaveModel
model
=
BeanUtil
.
copyProperties
(
dto
,
ProperNounSaveModel
.
class
);
model
.
setSimilarWords
(
JSON
.
toJSONString
(
dto
.
getSimilarWordList
()));
commonService
.
saveProperNoun
(
model
);
commonService
.
saveProperNoun
(
model
);
}
}
...
@@ -83,6 +94,10 @@ public class AppCommonService {
...
@@ -83,6 +94,10 @@ public class AppCommonService {
if
(
CollectionUtil
.
isNotEmpty
(
page
.
getRecords
()))
{
if
(
CollectionUtil
.
isNotEmpty
(
page
.
getRecords
()))
{
List
<
ProperNounDto
>
dtoList
=
page
.
getRecords
().
stream
().
map
(
v
->
{
List
<
ProperNounDto
>
dtoList
=
page
.
getRecords
().
stream
().
map
(
v
->
{
ProperNounDto
dto
=
BeanUtil
.
copyProperties
(
v
,
ProperNounDto
.
class
);
ProperNounDto
dto
=
BeanUtil
.
copyProperties
(
v
,
ProperNounDto
.
class
);
if
(
StrUtil
.
isNotEmpty
(
v
.
getSimilarWords
()))
{
dto
.
setSimilarWordList
(
JSONObject
.
parseArray
(
v
.
getSimilarWords
(),
String
.
class
));
}
return
dto
;
return
dto
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
...
@@ -90,4 +105,35 @@ public class AppCommonService {
...
@@ -90,4 +105,35 @@ public class AppCommonService {
}
}
return
pageResult
;
return
pageResult
;
}
}
/**
* 知识库分类列表
* @return
*/
public
List
<
KnowledgeDataBaseCategoryDto
>
KnowledgeDataBaseCategoryList
()
{
List
<
KnowledgeDataBaseCategoryDto
>
result
=
new
ArrayList
<>();
KnowledgeDataBaseCategoryDto
dto
=
new
KnowledgeDataBaseCategoryDto
();
dto
.
setId
(
1
);
dto
.
setName
(
"品项"
);
result
.
add
(
dto
);
return
result
;
}
/**
* APP角色列表
* @return
*/
public
List
<
AppRoleDto
>
appRoleList
()
{
List
<
AppRoleDto
>
result
=
new
ArrayList
<>();
AppRoleDto
dto
=
new
AppRoleDto
();
dto
.
setName
(
"顾问"
);
result
.
add
(
dto
);
AppRoleDto
dto2
=
new
AppRoleDto
();
dto2
.
setName
(
"美容师"
);
result
.
add
(
dto2
);
return
result
;
}
}
}
src/main/java/cn/breeze/elleai/application/service/AppExamineService.java
View file @
66c3f577
...
@@ -99,6 +99,7 @@ public class AppExamineService {
...
@@ -99,6 +99,7 @@ public class AppExamineService {
Assert
.
notNull
(
scene
,
"场景信息获取异常"
);
Assert
.
notNull
(
scene
,
"场景信息获取异常"
);
ExamineSceneCategorySaveModel
model
=
BeanUtil
.
copyProperties
(
dto
,
ExamineSceneCategorySaveModel
.
class
);
ExamineSceneCategorySaveModel
model
=
BeanUtil
.
copyProperties
(
dto
,
ExamineSceneCategorySaveModel
.
class
);
model
.
setVisibleRoleIds
(
JSONObject
.
toJSONString
(
dto
.
getVisibleRoleList
()));
examineService
.
saveSceneCategory
(
model
);
examineService
.
saveSceneCategory
(
model
);
}
}
...
@@ -126,6 +127,11 @@ public class AppExamineService {
...
@@ -126,6 +127,11 @@ public class AppExamineService {
dto
.
setSceneName
(
sceneResponseModel
.
getName
());
dto
.
setSceneName
(
sceneResponseModel
.
getName
());
}
}
}
}
if
(
StrUtil
.
isNotEmpty
(
v
.
getVisibleRoleIds
()))
{
dto
.
setVisibleRoleList
(
JSONObject
.
parseArray
(
v
.
getVisibleRoleIds
(),
String
.
class
));
}
return
dto
;
return
dto
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
...
@@ -181,6 +187,10 @@ public class AppExamineService {
...
@@ -181,6 +187,10 @@ public class AppExamineService {
}
}
}
}
if
(
StrUtil
.
isNotEmpty
(
v
.
getVisibleRoleIds
()))
{
dto
.
setVisibleRoleList
(
JSONObject
.
parseArray
(
v
.
getVisibleRoleIds
(),
String
.
class
));
}
return
dto
;
return
dto
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
}
}
...
@@ -473,6 +483,50 @@ public class AppExamineService {
...
@@ -473,6 +483,50 @@ public class AppExamineService {
return
result
;
return
result
;
}
}
/**
* 获取对练记录详情
* @param id
* @return
*/
public
ExamineRecordDto
examineRecordDetail
(
Integer
id
)
{
ExamineRecordDto
result
=
null
;
ExamineRecordResponseModel
model
=
examineService
.
examineRecordDetail
(
id
);
if
(
Objects
.
nonNull
(
model
))
{
result
=
BeanUtil
.
copyProperties
(
model
,
ExamineRecordDto
.
class
);
ExamineResponseModel
examine
=
examineService
.
examineDetail
(
result
.
getExamineId
());
if
(
Objects
.
nonNull
(
examine
))
{
result
.
setExamineName
(
examine
.
getName
());
result
.
setQaNum
(
examine
.
getQaNum
());
}
// 对练明细
ExamineDetailRecordRequestModel
req
=
new
ExamineDetailRecordRequestModel
();
req
.
setRecordId
(
id
);
List
<
ExamineDetailRecordResponseModel
>
detailRecordList
=
examineService
.
examineDetailRecordList
(
req
);
if
(
CollectionUtil
.
isNotEmpty
(
detailRecordList
))
{
// 题目信息
List
<
Integer
>
qaIdList
=
detailRecordList
.
stream
().
map
(
ExamineDetailRecordResponseModel:
:
getQaId
).
collect
(
Collectors
.
toList
());
List
<
ExamineQaResponseModel
>
examineQaList
=
examineService
.
examineQaList
(
qaIdList
);
Map
<
Integer
,
ExamineQaResponseModel
>
qaMap
=
examineQaList
.
stream
().
collect
(
toMap
(
ExamineQaResponseModel:
:
getId
,
Function
.
identity
()));
List
<
ExamineDetailRecordMobileDto
>
details
=
detailRecordList
.
stream
().
map
(
v
->
{
ExamineDetailRecordMobileDto
detail
=
BeanUtil
.
copyProperties
(
v
,
ExamineDetailRecordMobileDto
.
class
);
ExamineQaResponseModel
qaModel
=
qaMap
.
get
(
detail
.
getQaId
());
if
(
Objects
.
nonNull
(
qaModel
))
{
detail
.
setQuestion
(
qaModel
.
getQuestion
());
detail
.
setAnswer
(
qaModel
.
getAnswer
());
detail
.
setUserAnswer
(
v
.
getAnswer
());
}
return
detail
;
}).
collect
(
Collectors
.
toList
());
result
.
setDetails
(
details
);
}
}
return
result
;
}
/**
/**
* 获取对练记录详情
* 获取对练记录详情
* @param id
* @param id
...
@@ -678,6 +732,7 @@ public class AppExamineService {
...
@@ -678,6 +732,7 @@ public class AppExamineService {
if
(
Objects
.
nonNull
(
examineDto
))
{
if
(
Objects
.
nonNull
(
examineDto
))
{
dto
.
setExamineName
(
examineDto
.
getName
());
dto
.
setExamineName
(
examineDto
.
getName
());
dto
.
setExamineDescription
(
examineDto
.
getDescription
());
dto
.
setExamineDescription
(
examineDto
.
getDescription
());
dto
.
setQaNum
(
examineDto
.
getQaNum
());
}
}
return
dto
;
return
dto
;
...
...
src/main/java/cn/breeze/elleai/controller/admin/CommonController.java
View file @
66c3f577
...
@@ -3,7 +3,10 @@ package cn.breeze.elleai.controller.admin;
...
@@ -3,7 +3,10 @@ package cn.breeze.elleai.controller.admin;
import
cn.breeze.elleai.application.dto.ApiResponse
;
import
cn.breeze.elleai.application.dto.ApiResponse
;
import
cn.breeze.elleai.application.dto.PageResult
;
import
cn.breeze.elleai.application.dto.PageResult
;
import
cn.breeze.elleai.application.dto.request.*
;
import
cn.breeze.elleai.application.dto.request.ProperNounRequestDto
;
import
cn.breeze.elleai.application.dto.request.ProperNounSaveDto
;
import
cn.breeze.elleai.application.dto.response.AppRoleDto
;
import
cn.breeze.elleai.application.dto.response.KnowledgeDataBaseCategoryDto
;
import
cn.breeze.elleai.application.dto.response.ProperNounDto
;
import
cn.breeze.elleai.application.dto.response.ProperNounDto
;
import
cn.breeze.elleai.application.service.AppCommonService
;
import
cn.breeze.elleai.application.service.AppCommonService
;
import
cn.breeze.elleai.config.QueryParam
;
import
cn.breeze.elleai.config.QueryParam
;
...
@@ -13,6 +16,8 @@ import io.swagger.v3.oas.annotations.tags.Tag;
...
@@ -13,6 +16,8 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@RestController
@RestController
@RequestMapping
(
value
=
"/admin/common"
)
@RequestMapping
(
value
=
"/admin/common"
)
@Tag
(
name
=
"管理端-公共服务"
,
description
=
"公共服务"
)
@Tag
(
name
=
"管理端-公共服务"
,
description
=
"公共服务"
)
...
@@ -58,4 +63,18 @@ public class CommonController {
...
@@ -58,4 +63,18 @@ public class CommonController {
return
ApiResponse
.
ok
(
pageResult
);
return
ApiResponse
.
ok
(
pageResult
);
}
}
@Operation
(
summary
=
"知识库分类列表"
)
@GetMapping
(
"/kdb_category/list"
)
public
ApiResponse
<
List
<
KnowledgeDataBaseCategoryDto
>>
kdbCategoryList
()
{
List
<
KnowledgeDataBaseCategoryDto
>
result
=
commonService
.
KnowledgeDataBaseCategoryList
();
return
ApiResponse
.
ok
(
result
);
}
@Operation
(
summary
=
"伊丽汇APP角色列表"
)
@GetMapping
(
"/app_role/list"
)
public
ApiResponse
<
List
<
AppRoleDto
>>
appRoleList
()
{
List
<
AppRoleDto
>
result
=
commonService
.
appRoleList
();
return
ApiResponse
.
ok
(
result
);
}
}
}
src/main/java/cn/breeze/elleai/controller/admin/ExamineController.java
View file @
66c3f577
...
@@ -65,8 +65,8 @@ public class ExamineController {
...
@@ -65,8 +65,8 @@ public class ExamineController {
@Operation
(
summary
=
"对练记录详情"
,
tags
=
"对练记录"
)
@Operation
(
summary
=
"对练记录详情"
,
tags
=
"对练记录"
)
@GetMapping
(
"/record/detail/{id}"
)
@GetMapping
(
"/record/detail/{id}"
)
public
ApiResponse
<
ExamineRecord
Mobile
Dto
>
recordDetail
(
@Schema
(
description
=
"对练记录ID"
)
@PathVariable
(
"id"
)
Integer
id
)
{
public
ApiResponse
<
ExamineRecordDto
>
recordDetail
(
@Schema
(
description
=
"对练记录ID"
)
@PathVariable
(
"id"
)
Integer
id
)
{
ExamineRecord
MobileDto
detail
=
examineService
.
examineRecordMobile
Detail
(
id
);
ExamineRecord
Dto
detail
=
examineService
.
examineRecord
Detail
(
id
);
return
ApiResponse
.
ok
(
detail
);
return
ApiResponse
.
ok
(
detail
);
}
}
...
...
src/main/java/cn/breeze/elleai/controller/front/ExamineMobileController.java
View file @
66c3f577
...
@@ -110,7 +110,7 @@ public class ExamineMobileController {
...
@@ -110,7 +110,7 @@ public class ExamineMobileController {
return
ApiResponse
.
ok
(
"SUCCESS"
);
return
ApiResponse
.
ok
(
"SUCCESS"
);
}
}
@Operation
(
summary
=
"获取最终考试结果"
)
@Operation
(
summary
=
"
前端轮询,
获取最终考试结果"
)
@GetMapping
(
value
=
"/get_examine_final_result"
)
@GetMapping
(
value
=
"/get_examine_final_result"
)
public
ApiResponse
<
ExamineFinalResultDto
>
getExamineFinalResult
(
@Parameter
(
hidden
=
true
)
UserPrincipal
userPrincipal
,
public
ApiResponse
<
ExamineFinalResultDto
>
getExamineFinalResult
(
@Parameter
(
hidden
=
true
)
UserPrincipal
userPrincipal
,
@Schema
(
description
=
"对练ID"
)
@RequestParam
(
"examine_id"
)
Integer
examineId
,
@Schema
(
description
=
"对练ID"
)
@RequestParam
(
"examine_id"
)
Integer
examineId
,
...
...
src/main/java/cn/breeze/elleai/domain/sparring/model/request/ProperNounSaveModel.java
View file @
66c3f577
package
cn
.
breeze
.
elleai
.
domain
.
sparring
.
model
.
request
;
package
cn
.
breeze
.
elleai
.
domain
.
sparring
.
model
.
request
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.mybatisflex.annotation.Id
;
import
com.mybatisflex.annotation.Id
;
import
com.mybatisflex.annotation.KeyType
;
import
com.mybatisflex.annotation.KeyType
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
@Data
@Data
public
class
ProperNounSaveModel
implements
Serializable
{
public
class
ProperNounSaveModel
implements
Serializable
{
...
@@ -18,7 +21,7 @@ public class ProperNounSaveModel implements Serializable {
...
@@ -18,7 +21,7 @@ public class ProperNounSaveModel implements Serializable {
private
String
name
;
private
String
name
;
/**
/**
* 相似词
,以逗号分隔
* 相似词
*/
*/
private
String
similarWords
;
private
String
similarWords
;
...
@@ -27,11 +30,6 @@ public class ProperNounSaveModel implements Serializable {
...
@@ -27,11 +30,6 @@ public class ProperNounSaveModel implements Serializable {
*/
*/
private
Integer
status
;
private
Integer
status
;
/**
* 是否删除(0否 1是)
*/
private
Integer
deleted
;
/**
/**
* 创建时间
* 创建时间
*/
*/
...
...
src/main/java/cn/breeze/elleai/domain/sparring/model/request/QaAssistantSaveModel.java
View file @
66c3f577
...
@@ -27,12 +27,12 @@ public class QaAssistantSaveModel implements Serializable {
...
@@ -27,12 +27,12 @@ public class QaAssistantSaveModel implements Serializable {
private
String
iconUrl
;
private
String
iconUrl
;
/**
/**
* 知识库分类ID
S,以逗号分隔
* 知识库分类ID
列表
*/
*/
private
String
categoryIds
;
private
String
categoryIds
;
/**
/**
* 可见角色
IDS,以逗号分隔
* 可见角色
列表
*/
*/
private
String
visibleRoleIds
;
private
String
visibleRoleIds
;
...
...
src/main/java/cn/breeze/elleai/domain/sparring/model/response/ProperNounResponseModel.java
View file @
66c3f577
...
@@ -17,7 +17,7 @@ public class ProperNounResponseModel implements Serializable {
...
@@ -17,7 +17,7 @@ public class ProperNounResponseModel implements Serializable {
private
String
name
;
private
String
name
;
/**
/**
* 相似词
,以逗号分隔
* 相似词
列表
*/
*/
private
String
similarWords
;
private
String
similarWords
;
...
...
src/main/java/cn/breeze/elleai/domain/sparring/model/response/QaAssistantResponseModel.java
View file @
66c3f577
...
@@ -28,12 +28,12 @@ public class QaAssistantResponseModel implements Serializable {
...
@@ -28,12 +28,12 @@ public class QaAssistantResponseModel implements Serializable {
private
String
iconUrl
;
private
String
iconUrl
;
/**
/**
* 知识库分类ID
S,以逗号分隔
* 知识库分类ID
列表
*/
*/
private
String
categoryIds
;
private
String
categoryIds
;
/**
/**
* 可见角色
IDS,以逗号分隔
* 可见角色
列表
*/
*/
private
String
visibleRoleIds
;
private
String
visibleRoleIds
;
...
...
src/main/java/cn/breeze/elleai/domain/sparring/service/ChatCompletionServiceImpl.java
View file @
66c3f577
...
@@ -188,7 +188,7 @@ public class ChatCompletionServiceImpl implements ChatCompletionService{
...
@@ -188,7 +188,7 @@ public class ChatCompletionServiceImpl implements ChatCompletionService{
QaAssistantEntity
entity
=
BeanUtil
.
toBean
(
dto
,
QaAssistantEntity
.
class
);
QaAssistantEntity
entity
=
BeanUtil
.
toBean
(
dto
,
QaAssistantEntity
.
class
);
entity
.
setUpdateTime
(
new
Date
());
entity
.
setUpdateTime
(
new
Date
());
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
entity
.
setStatus
(
1
);
entity
.
setStatus
(
0
);
entity
.
setDeleted
(
0
);
entity
.
setDeleted
(
0
);
}
}
qaAssistantMapper
.
insertOrUpdateSelective
(
entity
);
qaAssistantMapper
.
insertOrUpdateSelective
(
entity
);
...
...
src/main/java/cn/breeze/elleai/domain/sparring/service/CommonServiceImpl.java
View file @
66c3f577
...
@@ -86,7 +86,7 @@ public class CommonServiceImpl implements CommonService{
...
@@ -86,7 +86,7 @@ public class CommonServiceImpl implements CommonService{
ProperNounEntity
entity
=
BeanUtil
.
toBean
(
dto
,
ProperNounEntity
.
class
);
ProperNounEntity
entity
=
BeanUtil
.
toBean
(
dto
,
ProperNounEntity
.
class
);
entity
.
setUpdateTime
(
new
Date
());
entity
.
setUpdateTime
(
new
Date
());
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
entity
.
setStatus
(
1
);
entity
.
setStatus
(
0
);
entity
.
setDeleted
(
0
);
entity
.
setDeleted
(
0
);
}
}
properNounMapper
.
insertOrUpdateSelective
(
entity
);
properNounMapper
.
insertOrUpdateSelective
(
entity
);
...
...
src/main/java/cn/breeze/elleai/domain/sparring/service/ExamineServiceImpl.java
View file @
66c3f577
...
@@ -179,7 +179,7 @@ public class ExamineServiceImpl implements ExamineService {
...
@@ -179,7 +179,7 @@ public class ExamineServiceImpl implements ExamineService {
ExamineSceneEntity
entity
=
BeanUtil
.
toBean
(
dto
,
ExamineSceneEntity
.
class
);
ExamineSceneEntity
entity
=
BeanUtil
.
toBean
(
dto
,
ExamineSceneEntity
.
class
);
entity
.
setUpdateTime
(
new
Date
());
entity
.
setUpdateTime
(
new
Date
());
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
entity
.
setStatus
(
1
);
entity
.
setStatus
(
0
);
entity
.
setDeleted
(
0
);
entity
.
setDeleted
(
0
);
}
}
sceneMapper
.
insertOrUpdateSelective
(
entity
);
sceneMapper
.
insertOrUpdateSelective
(
entity
);
...
@@ -190,7 +190,7 @@ public class ExamineServiceImpl implements ExamineService {
...
@@ -190,7 +190,7 @@ public class ExamineServiceImpl implements ExamineService {
ExamineSceneCategoryEntity
entity
=
BeanUtil
.
toBean
(
dto
,
ExamineSceneCategoryEntity
.
class
);
ExamineSceneCategoryEntity
entity
=
BeanUtil
.
toBean
(
dto
,
ExamineSceneCategoryEntity
.
class
);
entity
.
setUpdateTime
(
new
Date
());
entity
.
setUpdateTime
(
new
Date
());
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
entity
.
setStatus
(
1
);
entity
.
setStatus
(
0
);
entity
.
setDeleted
(
0
);
entity
.
setDeleted
(
0
);
}
}
sceneCategoryMapper
.
insertOrUpdateSelective
(
entity
);
sceneCategoryMapper
.
insertOrUpdateSelective
(
entity
);
...
@@ -267,7 +267,7 @@ public class ExamineServiceImpl implements ExamineService {
...
@@ -267,7 +267,7 @@ public class ExamineServiceImpl implements ExamineService {
ExamineQaEntity
entity
=
BeanUtil
.
toBean
(
dto
,
ExamineQaEntity
.
class
);
ExamineQaEntity
entity
=
BeanUtil
.
toBean
(
dto
,
ExamineQaEntity
.
class
);
entity
.
setUpdateTime
(
new
Date
());
entity
.
setUpdateTime
(
new
Date
());
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
entity
.
setStatus
(
1
);
entity
.
setStatus
(
0
);
entity
.
setDeleted
(
0
);
entity
.
setDeleted
(
0
);
}
}
qaMapper
.
insertOrUpdateSelective
(
entity
);
qaMapper
.
insertOrUpdateSelective
(
entity
);
...
@@ -336,7 +336,7 @@ public class ExamineServiceImpl implements ExamineService {
...
@@ -336,7 +336,7 @@ public class ExamineServiceImpl implements ExamineService {
ExamineEntity
entity
=
BeanUtil
.
toBean
(
dto
,
ExamineEntity
.
class
);
ExamineEntity
entity
=
BeanUtil
.
toBean
(
dto
,
ExamineEntity
.
class
);
entity
.
setUpdateTime
(
new
Date
());
entity
.
setUpdateTime
(
new
Date
());
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
entity
.
setStatus
(
1
);
entity
.
setStatus
(
0
);
entity
.
setDeleted
(
0
);
entity
.
setDeleted
(
0
);
}
}
examineMapper
.
insertOrUpdateSelective
(
entity
);
examineMapper
.
insertOrUpdateSelective
(
entity
);
...
@@ -514,7 +514,7 @@ public class ExamineServiceImpl implements ExamineService {
...
@@ -514,7 +514,7 @@ public class ExamineServiceImpl implements ExamineService {
WikiCategoryEntity
entity
=
BeanUtil
.
toBean
(
dto
,
WikiCategoryEntity
.
class
);
WikiCategoryEntity
entity
=
BeanUtil
.
toBean
(
dto
,
WikiCategoryEntity
.
class
);
entity
.
setUpdateTime
(
new
Date
());
entity
.
setUpdateTime
(
new
Date
());
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
entity
.
setStatus
(
1
);
entity
.
setStatus
(
0
);
entity
.
setDeleted
(
0
);
entity
.
setDeleted
(
0
);
}
}
wikiCategoryMapper
.
insertOrUpdateSelective
(
entity
);
wikiCategoryMapper
.
insertOrUpdateSelective
(
entity
);
...
@@ -577,7 +577,7 @@ public class ExamineServiceImpl implements ExamineService {
...
@@ -577,7 +577,7 @@ public class ExamineServiceImpl implements ExamineService {
WikiEntity
entity
=
BeanUtil
.
toBean
(
dto
,
WikiEntity
.
class
);
WikiEntity
entity
=
BeanUtil
.
toBean
(
dto
,
WikiEntity
.
class
);
entity
.
setUpdateTime
(
new
Date
());
entity
.
setUpdateTime
(
new
Date
());
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
entity
.
setStatus
(
1
);
entity
.
setStatus
(
0
);
entity
.
setDeleted
(
0
);
entity
.
setDeleted
(
0
);
}
}
wikiMapper
.
insertOrUpdateSelective
(
entity
);
wikiMapper
.
insertOrUpdateSelective
(
entity
);
...
...
src/main/java/cn/breeze/elleai/infra/entity/ProperNounEntity.java
View file @
66c3f577
...
@@ -38,7 +38,7 @@ public class ProperNounEntity implements Serializable {
...
@@ -38,7 +38,7 @@ public class ProperNounEntity implements Serializable {
private
String
name
;
private
String
name
;
/**
/**
* 相似词
,以逗号分隔
* 相似词
列表
*/
*/
private
String
similarWords
;
private
String
similarWords
;
...
...
src/main/java/cn/breeze/elleai/infra/entity/QaAssistantEntity.java
View file @
66c3f577
...
@@ -48,12 +48,12 @@ public class QaAssistantEntity implements Serializable {
...
@@ -48,12 +48,12 @@ public class QaAssistantEntity implements Serializable {
private
String
iconUrl
;
private
String
iconUrl
;
/**
/**
* 知识库分类ID
S,以逗号分隔
* 知识库分类ID
列表
*/
*/
private
String
categoryIds
;
private
String
categoryIds
;
/**
/**
* 可见角色
IDS,以逗号分隔
* 可见角色
列表
*/
*/
private
String
visibleRoleIds
;
private
String
visibleRoleIds
;
...
...
src/main/java/cn/breeze/elleai/infra/entity/table/ProperNounTableDef.java
View file @
66c3f577
...
@@ -50,7 +50,7 @@ public class ProperNounTableDef extends TableDef {
...
@@ -50,7 +50,7 @@ public class ProperNounTableDef extends TableDef {
public
final
QueryColumn
UPDATE_TIME
=
new
QueryColumn
(
this
,
"update_time"
);
public
final
QueryColumn
UPDATE_TIME
=
new
QueryColumn
(
this
,
"update_time"
);
/**
/**
* 相似词
,以逗号分隔
* 相似词
列表
*/
*/
public
final
QueryColumn
SIMILAR_WORDS
=
new
QueryColumn
(
this
,
"similar_words"
);
public
final
QueryColumn
SIMILAR_WORDS
=
new
QueryColumn
(
this
,
"similar_words"
);
...
...
src/main/java/cn/breeze/elleai/infra/entity/table/QaAssistantTableDef.java
View file @
66c3f577
...
@@ -55,7 +55,7 @@ public class QaAssistantTableDef extends TableDef {
...
@@ -55,7 +55,7 @@ public class QaAssistantTableDef extends TableDef {
public
final
QueryColumn
UPDATE_TIME
=
new
QueryColumn
(
this
,
"update_time"
);
public
final
QueryColumn
UPDATE_TIME
=
new
QueryColumn
(
this
,
"update_time"
);
/**
/**
* 知识库分类ID
S,以逗号分隔
* 知识库分类ID
列表
*/
*/
public
final
QueryColumn
CATEGORY_IDS
=
new
QueryColumn
(
this
,
"category_ids"
);
public
final
QueryColumn
CATEGORY_IDS
=
new
QueryColumn
(
this
,
"category_ids"
);
...
@@ -65,7 +65,7 @@ public class QaAssistantTableDef extends TableDef {
...
@@ -65,7 +65,7 @@ public class QaAssistantTableDef extends TableDef {
public
final
QueryColumn
DESCRIPTION
=
new
QueryColumn
(
this
,
"description"
);
public
final
QueryColumn
DESCRIPTION
=
new
QueryColumn
(
this
,
"description"
);
/**
/**
* 可见角色
IDS,以逗号分隔
* 可见角色
列表
*/
*/
public
final
QueryColumn
VISIBLE_ROLE_IDS
=
new
QueryColumn
(
this
,
"visible_role_ids"
);
public
final
QueryColumn
VISIBLE_ROLE_IDS
=
new
QueryColumn
(
this
,
"visible_role_ids"
);
...
...
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