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
180a8f32
Commit
180a8f32
authored
Oct 24, 2024
by
杨翌文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature: 配置修改
parent
7f9c37cb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
33 deletions
+13
-33
AppChatCompletionService.java
.../elleai/application/service/AppChatCompletionService.java
+1
-9
AppExamineService.java
.../breeze/elleai/application/service/AppExamineService.java
+0
-11
UserQaRequestModel.java
...eai/domain/sparring/model/request/UserQaRequestModel.java
+2
-0
ChatCompletionServiceImpl.java
...ai/domain/sparring/service/ChatCompletionServiceImpl.java
+5
-9
CommonServiceImpl.java
...eze/elleai/domain/sparring/service/CommonServiceImpl.java
+0
-1
ExamineServiceImpl.java
...ze/elleai/domain/sparring/service/ExamineServiceImpl.java
+5
-3
No files found.
src/main/java/cn/breeze/elleai/application/service/AppChatCompletionService.java
View file @
180a8f32
...
@@ -217,16 +217,8 @@ public class AppChatCompletionService {
...
@@ -217,16 +217,8 @@ public class AppChatCompletionService {
Page
<
UserChatCompletionResponseModel
>
page
=
chatCompletionService
.
userQaPaginQuery
(
requestModel
);
Page
<
UserChatCompletionResponseModel
>
page
=
chatCompletionService
.
userQaPaginQuery
(
requestModel
);
PageResult
<
UserChatCompletionDto
>
pageResult
=
PageResult
.
of
(
request
.
getPageNo
(),
request
.
getPageSize
(),
(
int
)
page
.
getTotalRow
(),
null
);
PageResult
<
UserChatCompletionDto
>
pageResult
=
PageResult
.
of
(
request
.
getPageNo
(),
request
.
getPageSize
(),
(
int
)
page
.
getTotalRow
(),
null
);
if
(
CollectionUtil
.
isNotEmpty
(
page
.
getRecords
()))
{
if
(
CollectionUtil
.
isNotEmpty
(
page
.
getRecords
()))
{
List
<
UserChatCompletionDto
>
dtoList
=
page
.
getRecords
().
stream
().
map
(
v
->
{
List
<
UserChatCompletionDto
>
dtoList
=
page
.
getRecords
().
stream
().
map
(
v
->
BeanUtil
.
copyProperties
(
v
,
UserChatCompletionDto
.
class
)).
collect
(
Collectors
.
toList
());
UserChatCompletionDto
dto
=
BeanUtil
.
copyProperties
(
v
,
UserChatCompletionDto
.
class
);
//TODO 员工名称,提问信息
return
dto
;
}).
collect
(
Collectors
.
toList
());
pageResult
.
setItems
(
dtoList
);
pageResult
.
setItems
(
dtoList
);
}
}
return
pageResult
;
return
pageResult
;
...
...
src/main/java/cn/breeze/elleai/application/service/AppExamineService.java
View file @
180a8f32
...
@@ -240,7 +240,6 @@ public class AppExamineService {
...
@@ -240,7 +240,6 @@ public class AppExamineService {
* @param dto
* @param dto
*/
*/
public
void
saveExamineScene
(
ExamineSceneSaveDto
dto
)
{
public
void
saveExamineScene
(
ExamineSceneSaveDto
dto
)
{
ExamineSceneSaveModel
model
=
BeanUtil
.
copyProperties
(
dto
,
ExamineSceneSaveModel
.
class
);
ExamineSceneSaveModel
model
=
BeanUtil
.
copyProperties
(
dto
,
ExamineSceneSaveModel
.
class
);
examineService
.
saveScene
(
model
);
examineService
.
saveScene
(
model
);
}
}
...
@@ -368,12 +367,9 @@ public class AppExamineService {
...
@@ -368,12 +367,9 @@ public class AppExamineService {
* @param dto
* @param dto
*/
*/
public
void
saveExamineQa
(
ExamineQaSaveDto
dto
)
{
public
void
saveExamineQa
(
ExamineQaSaveDto
dto
)
{
Assert
.
notNull
(
dto
.
getCategoryId
(),
"分类ID不能为空"
);
Assert
.
notNull
(
dto
.
getCategoryId
(),
"分类ID不能为空"
);
ExamineSceneCategoryResponseModel
category
=
examineService
.
sceneCategoryDetail
(
dto
.
getCategoryId
());
ExamineSceneCategoryResponseModel
category
=
examineService
.
sceneCategoryDetail
(
dto
.
getCategoryId
());
Assert
.
notNull
(
category
,
"分类信息获取异常"
);
Assert
.
notNull
(
category
,
"分类信息获取异常"
);
ExamineQaSaveModel
model
=
BeanUtil
.
copyProperties
(
dto
,
ExamineQaSaveModel
.
class
);
ExamineQaSaveModel
model
=
BeanUtil
.
copyProperties
(
dto
,
ExamineQaSaveModel
.
class
);
examineService
.
saveExamineQa
(
model
);
examineService
.
saveExamineQa
(
model
);
}
}
...
@@ -748,15 +744,8 @@ public class AppExamineService {
...
@@ -748,15 +744,8 @@ public class AppExamineService {
* @return
* @return
*/
*/
public
PageResult
<
ExamineRecordDto
>
examineRecordPaginQuery
(
ExamineRecordRequestDto
request
)
{
public
PageResult
<
ExamineRecordDto
>
examineRecordPaginQuery
(
ExamineRecordRequestDto
request
)
{
ExamineRecordRequestModel
requestModel
=
BeanUtil
.
copyProperties
(
request
,
ExamineRecordRequestModel
.
class
);
ExamineRecordRequestModel
requestModel
=
BeanUtil
.
copyProperties
(
request
,
ExamineRecordRequestModel
.
class
);
ExamineRequestModel
rm
=
new
ExamineRequestModel
();
rm
.
setName
(
request
.
getUserName
());
examineService
.
examineList
(
rm
);
Page
<
ExamineRecordResponseModel
>
page
=
examineService
.
examineRecordPaginQuery
(
requestModel
);
Page
<
ExamineRecordResponseModel
>
page
=
examineService
.
examineRecordPaginQuery
(
requestModel
);
PageResult
<
ExamineRecordDto
>
pageResult
=
PageResult
.
of
(
request
.
getPageNo
(),
request
.
getPageSize
(),
(
int
)
page
.
getTotalRow
(),
null
);
PageResult
<
ExamineRecordDto
>
pageResult
=
PageResult
.
of
(
request
.
getPageNo
(),
request
.
getPageSize
(),
(
int
)
page
.
getTotalRow
(),
null
);
if
(
CollectionUtil
.
isNotEmpty
(
page
.
getRecords
()))
{
if
(
CollectionUtil
.
isNotEmpty
(
page
.
getRecords
()))
{
...
...
src/main/java/cn/breeze/elleai/domain/sparring/model/request/UserQaRequestModel.java
View file @
180a8f32
...
@@ -18,6 +18,8 @@ public class UserQaRequestModel implements Serializable {
...
@@ -18,6 +18,8 @@ public class UserQaRequestModel implements Serializable {
private
String
userName
;
private
String
userName
;
private
String
shopName
;
private
String
sessionId
;
private
String
sessionId
;
private
Date
startTime
;
private
Date
startTime
;
...
...
src/main/java/cn/breeze/elleai/domain/sparring/service/ChatCompletionServiceImpl.java
View file @
180a8f32
...
@@ -43,13 +43,12 @@ public class ChatCompletionServiceImpl implements ChatCompletionService{
...
@@ -43,13 +43,12 @@ public class ChatCompletionServiceImpl implements ChatCompletionService{
public
Page
<
UserChatCompletionResponseModel
>
userQaPaginQuery
(
UserQaRequestModel
request
)
{
public
Page
<
UserChatCompletionResponseModel
>
userQaPaginQuery
(
UserQaRequestModel
request
)
{
Integer
pageNo
=
ObjectUtil
.
defaultIfNull
(
request
.
getPageNo
(),
1
);
Integer
pageNo
=
ObjectUtil
.
defaultIfNull
(
request
.
getPageNo
(),
1
);
Integer
pageSize
=
ObjectUtil
.
defaultIfNull
(
request
.
getPageSize
(),
10
);
Integer
pageSize
=
ObjectUtil
.
defaultIfNull
(
request
.
getPageSize
(),
10
);
QueryWrapper
queryWrapper
=
QueryWrapper
.
create
();
QueryWrapper
queryWrapper
=
QueryWrapper
.
create
();
if
(
StrUtil
.
isNotEmpty
(
request
.
getUserId
()))
{
queryWrapper
.
where
(
USER_CHAT_COMPLETION_ENTITY
.
USER_ID
.
eq
(
request
.
getUserId
()));
}
if
(
StrUtil
.
isNotEmpty
(
request
.
getUserName
()))
{
if
(
StrUtil
.
isNotEmpty
(
request
.
getUserName
()))
{
queryWrapper
.
where
(
USER_CHAT_COMPLETION_ENTITY
.
USER_NAME
.
like
(
"%"
+
request
.
getUserName
()+
"%"
));
queryWrapper
.
where
(
USER_CHAT_COMPLETION_ENTITY
.
USER_NAME
.
eq
(
request
.
getUserName
()));
}
if
(
StrUtil
.
isNotEmpty
(
request
.
getShopName
()))
{
queryWrapper
.
where
(
USER_CHAT_COMPLETION_ENTITY
.
SHOP_NAME
.
like
(
"%"
+
request
.
getShopName
()+
"%"
));
}
}
if
(
Objects
.
nonNull
(
request
.
getStartTime
()))
{
if
(
Objects
.
nonNull
(
request
.
getStartTime
()))
{
queryWrapper
.
where
(
USER_CHAT_COMPLETION_ENTITY
.
CREATE_TIME
.
ge
(
request
.
getStartTime
()));
queryWrapper
.
where
(
USER_CHAT_COMPLETION_ENTITY
.
CREATE_TIME
.
ge
(
request
.
getStartTime
()));
...
@@ -58,10 +57,7 @@ public class ChatCompletionServiceImpl implements ChatCompletionService{
...
@@ -58,10 +57,7 @@ public class ChatCompletionServiceImpl implements ChatCompletionService{
queryWrapper
.
where
(
USER_CHAT_COMPLETION_ENTITY
.
CREATE_TIME
.
le
(
request
.
getEndTime
()));
queryWrapper
.
where
(
USER_CHAT_COMPLETION_ENTITY
.
CREATE_TIME
.
le
(
request
.
getEndTime
()));
}
}
queryWrapper
.
orderBy
(
USER_CHAT_COMPLETION_ENTITY
.
CREATE_TIME
,
false
);
queryWrapper
.
orderBy
(
USER_CHAT_COMPLETION_ENTITY
.
CREATE_TIME
,
false
);
return
chatCompletionMapper
.
paginateAs
(
pageNo
,
pageSize
,
queryWrapper
,
UserChatCompletionResponseModel
.
class
);
Page
<
UserChatCompletionResponseModel
>
page
=
chatCompletionMapper
.
paginateAs
(
pageNo
,
pageSize
,
queryWrapper
,
UserChatCompletionResponseModel
.
class
);
return
page
;
}
}
@Override
@Override
...
...
src/main/java/cn/breeze/elleai/domain/sparring/service/CommonServiceImpl.java
View file @
180a8f32
...
@@ -104,7 +104,6 @@ public class CommonServiceImpl implements CommonService{
...
@@ -104,7 +104,6 @@ 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
(
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 @
180a8f32
...
@@ -17,6 +17,7 @@ import org.apache.ibatis.annotations.Param;
...
@@ -17,6 +17,7 @@ import org.apache.ibatis.annotations.Param;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -182,8 +183,10 @@ public class ExamineServiceImpl implements ExamineService {
...
@@ -182,8 +183,10 @@ public class ExamineServiceImpl implements ExamineService {
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
entity
.
setStatus
(
0
);
entity
.
setStatus
(
0
);
entity
.
setDeleted
(
0
);
entity
.
setDeleted
(
0
);
entity
.
setCreateTime
(
new
Date
());
sceneMapper
.
insert
(
entity
);
}
}
sceneMapper
.
insertOrUpdate
Selective
(
entity
);
sceneMapper
.
insertOrUpdate
(
entity
,
false
);
}
}
@Override
@Override
...
@@ -282,12 +285,11 @@ public class ExamineServiceImpl implements ExamineService {
...
@@ -282,12 +285,11 @@ public class ExamineServiceImpl implements ExamineService {
@Override
@Override
public
void
saveExamineQa
(
ExamineQaSaveModel
dto
)
{
public
void
saveExamineQa
(
ExamineQaSaveModel
dto
)
{
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
(
0
);
entity
.
setDeleted
(
0
);
entity
.
setDeleted
(
0
);
entity
.
setCreateTime
(
new
Date
());
}
}
qaMapper
.
insertOrUpdateSelective
(
entity
);
qaMapper
.
insertOrUpdateSelective
(
entity
);
}
}
...
...
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