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
151e5a2b
Commit
151e5a2b
authored
Oct 22, 2024
by
陈立彬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
知识库管理
parent
32b01ebc
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
3 deletions
+23
-3
WikiRequestDto.java
...breeze/elleai/application/dto/request/WikiRequestDto.java
+4
-0
AppCommonService.java
...n/breeze/elleai/application/service/AppCommonService.java
+1
-1
AppExamineService.java
.../breeze/elleai/application/service/AppExamineService.java
+2
-0
CommonController.java
...a/cn/breeze/elleai/controller/admin/CommonController.java
+1
-1
ExamineMobileController.java
...eeze/elleai/controller/front/ExamineMobileController.java
+1
-1
WikiCategoryRequestModel.java
...main/sparring/model/request/WikiCategoryRequestModel.java
+1
-0
WikiRequestModel.java
...lleai/domain/sparring/model/request/WikiRequestModel.java
+2
-0
ExamineServiceImpl.java
...ze/elleai/domain/sparring/service/ExamineServiceImpl.java
+11
-0
No files found.
src/main/java/cn/breeze/elleai/application/dto/request/WikiRequestDto.java
View file @
151e5a2b
...
@@ -20,6 +20,10 @@ public class WikiRequestDto implements Serializable {
...
@@ -20,6 +20,10 @@ public class WikiRequestDto implements Serializable {
@Schema
(
description
=
"资料名称"
)
@Schema
(
description
=
"资料名称"
)
private
String
name
;
private
String
name
;
@Schema
(
description
=
"知识库分类ID"
)
@JsonProperty
(
"category_id"
)
private
Integer
categoryId
;
@Schema
(
description
=
"知识库分类ID"
)
@Schema
(
description
=
"知识库分类ID"
)
@JsonProperty
(
"wiki_category_id"
)
@JsonProperty
(
"wiki_category_id"
)
private
Integer
wikiCategoryId
;
private
Integer
wikiCategoryId
;
...
...
src/main/java/cn/breeze/elleai/application/service/AppCommonService.java
View file @
151e5a2b
...
@@ -80,7 +80,7 @@ public class AppCommonService {
...
@@ -80,7 +80,7 @@ public class AppCommonService {
* 保存专有名词
* 保存专有名词
* @param dto
* @param dto
*/
*/
public
void
save
p
roperNoun
(
ProperNounSaveDto
dto
)
{
public
void
save
P
roperNoun
(
ProperNounSaveDto
dto
)
{
ProperNounSaveModel
model
=
BeanUtil
.
copyProperties
(
dto
,
ProperNounSaveModel
.
class
);
ProperNounSaveModel
model
=
BeanUtil
.
copyProperties
(
dto
,
ProperNounSaveModel
.
class
);
model
.
setSimilarWords
(
JSON
.
toJSONString
(
dto
.
getSimilarWordList
()));
model
.
setSimilarWords
(
JSON
.
toJSONString
(
dto
.
getSimilarWordList
()));
...
...
src/main/java/cn/breeze/elleai/application/service/AppExamineService.java
View file @
151e5a2b
...
@@ -831,6 +831,7 @@ public class AppExamineService {
...
@@ -831,6 +831,7 @@ public class AppExamineService {
public
PageResult
<
WikiCategoryMobileDto
>
wikiCategoryMobilePaginQuery
(
WikiCategoryRequestDto
request
)
{
public
PageResult
<
WikiCategoryMobileDto
>
wikiCategoryMobilePaginQuery
(
WikiCategoryRequestDto
request
)
{
WikiCategoryRequestModel
requestModel
=
BeanUtil
.
copyProperties
(
request
,
WikiCategoryRequestModel
.
class
);
WikiCategoryRequestModel
requestModel
=
BeanUtil
.
copyProperties
(
request
,
WikiCategoryRequestModel
.
class
);
requestModel
.
setStatus
(
1
);
Page
<
WikiCategoryResponseModel
>
page
=
examineService
.
wikiCategoryPaginQuery
(
requestModel
);
Page
<
WikiCategoryResponseModel
>
page
=
examineService
.
wikiCategoryPaginQuery
(
requestModel
);
...
@@ -960,6 +961,7 @@ public class AppExamineService {
...
@@ -960,6 +961,7 @@ public class AppExamineService {
public
PageResult
<
WikiListMobileDto
>
wikiMobilePaginQuery
(
WikiRequestDto
request
)
{
public
PageResult
<
WikiListMobileDto
>
wikiMobilePaginQuery
(
WikiRequestDto
request
)
{
WikiRequestModel
requestModel
=
BeanUtil
.
copyProperties
(
request
,
WikiRequestModel
.
class
);
WikiRequestModel
requestModel
=
BeanUtil
.
copyProperties
(
request
,
WikiRequestModel
.
class
);
requestModel
.
setStatus
(
1
);
Page
<
WikiResponseModel
>
page
=
examineService
.
wikiPaginQuery
(
requestModel
);
Page
<
WikiResponseModel
>
page
=
examineService
.
wikiPaginQuery
(
requestModel
);
...
...
src/main/java/cn/breeze/elleai/controller/admin/CommonController.java
View file @
151e5a2b
...
@@ -52,7 +52,7 @@ public class CommonController {
...
@@ -52,7 +52,7 @@ public class CommonController {
@Operation
(
summary
=
"保存专有名词"
)
@Operation
(
summary
=
"保存专有名词"
)
@PostMapping
(
"/proper_noun/save"
)
@PostMapping
(
"/proper_noun/save"
)
public
ApiResponse
<
String
>
saveOrUpdate
(
@RequestBody
ProperNounSaveDto
dto
)
{
public
ApiResponse
<
String
>
saveOrUpdate
(
@RequestBody
ProperNounSaveDto
dto
)
{
commonService
.
save
p
roperNoun
(
dto
);
commonService
.
save
P
roperNoun
(
dto
);
return
ApiResponse
.
ok
(
"ok"
);
return
ApiResponse
.
ok
(
"ok"
);
}
}
...
...
src/main/java/cn/breeze/elleai/controller/front/ExamineMobileController.java
View file @
151e5a2b
...
@@ -146,7 +146,7 @@ public class ExamineMobileController {
...
@@ -146,7 +146,7 @@ public class ExamineMobileController {
@Operation
(
summary
=
"退出考试,清除考试记录"
)
@Operation
(
summary
=
"退出考试,清除考试记录"
)
@PostMapping
(
value
=
"/exit_examine"
)
@PostMapping
(
value
=
"/exit_examine"
)
public
ApiResponse
<
String
>
exitExam
(
@Parameter
(
hidden
=
true
)
UserPrincipal
userPrincipal
,
public
ApiResponse
<
String
>
exitExam
(
@Parameter
(
hidden
=
true
)
UserPrincipal
userPrincipal
,
@Schema
(
description
=
"对练ID"
)
@RequestParam
(
"examine_id"
)
Integer
examineId
,
@Schema
(
description
=
"对练ID"
)
@RequestParam
(
"exam
a
ine_id"
)
Integer
examineId
,
@Schema
(
description
=
"考试流水号"
)
@RequestParam
(
"business_no"
)
String
businessNo
)
{
@Schema
(
description
=
"考试流水号"
)
@RequestParam
(
"business_no"
)
String
businessNo
)
{
examineService
.
exitExamine
(
userPrincipal
,
examineId
,
businessNo
);
examineService
.
exitExamine
(
userPrincipal
,
examineId
,
businessNo
);
...
...
src/main/java/cn/breeze/elleai/domain/sparring/model/request/WikiCategoryRequestModel.java
View file @
151e5a2b
...
@@ -13,5 +13,6 @@ public class WikiCategoryRequestModel implements Serializable {
...
@@ -13,5 +13,6 @@ public class WikiCategoryRequestModel implements Serializable {
private
String
name
;
private
String
name
;
private
Integer
status
;
}
}
src/main/java/cn/breeze/elleai/domain/sparring/model/request/WikiRequestModel.java
View file @
151e5a2b
...
@@ -15,6 +15,8 @@ public class WikiRequestModel implements Serializable {
...
@@ -15,6 +15,8 @@ public class WikiRequestModel implements Serializable {
private
String
name
;
private
String
name
;
private
Integer
categoryId
;
private
Integer
wikiCategoryId
;
private
Integer
wikiCategoryId
;
private
Integer
sceneCategoryId
;
private
Integer
sceneCategoryId
;
...
...
src/main/java/cn/breeze/elleai/domain/sparring/service/ExamineServiceImpl.java
View file @
151e5a2b
...
@@ -541,6 +541,10 @@ public class ExamineServiceImpl implements ExamineService {
...
@@ -541,6 +541,10 @@ public class ExamineServiceImpl implements ExamineService {
if
(
StrUtil
.
isNotEmpty
(
request
.
getName
()))
{
if
(
StrUtil
.
isNotEmpty
(
request
.
getName
()))
{
queryWrapper
.
where
(
WIKI_CATEGORY_ENTITY
.
NAME
.
like
(
"%"
+
request
.
getName
()+
"%"
));
queryWrapper
.
where
(
WIKI_CATEGORY_ENTITY
.
NAME
.
like
(
"%"
+
request
.
getName
()+
"%"
));
}
}
if
(
Objects
.
nonNull
(
request
.
getStatus
()))
{
queryWrapper
.
where
(
WIKI_CATEGORY_ENTITY
.
STATUS
.
eq
(
request
.
getStatus
()));
}
queryWrapper
.
orderBy
(
WIKI_CATEGORY_ENTITY
.
CREATE_TIME
,
false
);
Page
<
WikiCategoryResponseModel
>
page
=
wikiCategoryMapper
.
paginateAs
(
pageNo
,
pageSize
,
queryWrapper
,
WikiCategoryResponseModel
.
class
);
Page
<
WikiCategoryResponseModel
>
page
=
wikiCategoryMapper
.
paginateAs
(
pageNo
,
pageSize
,
queryWrapper
,
WikiCategoryResponseModel
.
class
);
...
@@ -554,6 +558,10 @@ public class ExamineServiceImpl implements ExamineService {
...
@@ -554,6 +558,10 @@ public class ExamineServiceImpl implements ExamineService {
if
(
StrUtil
.
isNotEmpty
(
request
.
getName
()))
{
if
(
StrUtil
.
isNotEmpty
(
request
.
getName
()))
{
queryWrapper
.
where
(
WIKI_CATEGORY_ENTITY
.
NAME
.
like
(
"%"
+
request
.
getName
()+
"%"
));
queryWrapper
.
where
(
WIKI_CATEGORY_ENTITY
.
NAME
.
like
(
"%"
+
request
.
getName
()+
"%"
));
}
}
if
(
Objects
.
nonNull
(
request
.
getStatus
()))
{
queryWrapper
.
where
(
WIKI_CATEGORY_ENTITY
.
STATUS
.
eq
(
request
.
getStatus
()));
}
queryWrapper
.
orderBy
(
WIKI_CATEGORY_ENTITY
.
CREATE_TIME
,
false
);
return
wikiCategoryMapper
.
selectListByQueryAs
(
queryWrapper
,
WikiCategoryResponseModel
.
class
);
return
wikiCategoryMapper
.
selectListByQueryAs
(
queryWrapper
,
WikiCategoryResponseModel
.
class
);
}
}
...
@@ -607,6 +615,9 @@ public class ExamineServiceImpl implements ExamineService {
...
@@ -607,6 +615,9 @@ public class ExamineServiceImpl implements ExamineService {
if
(
Objects
.
nonNull
(
request
.
getWikiCategoryId
()))
{
if
(
Objects
.
nonNull
(
request
.
getWikiCategoryId
()))
{
queryWrapper
.
and
(
WIKI_ENTITY
.
WIKI_CATEGORY_ID
.
eq
(
request
.
getWikiCategoryId
()));
queryWrapper
.
and
(
WIKI_ENTITY
.
WIKI_CATEGORY_ID
.
eq
(
request
.
getWikiCategoryId
()));
}
}
if
(
Objects
.
nonNull
(
request
.
getCategoryId
()))
{
queryWrapper
.
and
(
WIKI_ENTITY
.
WIKI_CATEGORY_ID
.
eq
(
request
.
getCategoryId
()));
}
if
(
Objects
.
nonNull
(
request
.
getSceneCategoryId
()))
{
if
(
Objects
.
nonNull
(
request
.
getSceneCategoryId
()))
{
queryWrapper
.
and
(
WIKI_ENTITY
.
SCENE_CATEGORY_ID
.
eq
(
request
.
getSceneCategoryId
()));
queryWrapper
.
and
(
WIKI_ENTITY
.
SCENE_CATEGORY_ID
.
eq
(
request
.
getSceneCategoryId
()));
}
}
...
...
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