Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fill-system
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖旭伟
fill-system
Commits
3b73fcce
Commit
3b73fcce
authored
Dec 08, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改热门词汇
parent
69825b45
Pipeline
#2408
canceled with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
+27
-4
fill-manager/src/main/java/com/mortals/xhx/module/baseset/service/impl/BasesetServiceImpl.java
...s/xhx/module/baseset/service/impl/BasesetServiceImpl.java
+25
-2
fill-manager/src/test/java/com/mortals/httpclient/hotword/HotwordController.http
...ava/com/mortals/httpclient/hotword/HotwordController.http
+2
-2
No files found.
fill-manager/src/main/java/com/mortals/xhx/module/baseset/service/impl/BasesetServiceImpl.java
View file @
3b73fcce
...
@@ -12,7 +12,9 @@ import com.mortals.framework.model.Context;
...
@@ -12,7 +12,9 @@ import com.mortals.framework.model.Context;
import
com.mortals.xhx.module.baseset.dao.BasesetDao
;
import
com.mortals.xhx.module.baseset.dao.BasesetDao
;
import
com.mortals.xhx.module.baseset.model.BasesetEntity
;
import
com.mortals.xhx.module.baseset.model.BasesetEntity
;
import
com.mortals.xhx.module.baseset.service.BasesetService
;
import
com.mortals.xhx.module.baseset.service.BasesetService
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -31,13 +33,34 @@ public class BasesetServiceImpl extends AbstractCRUDServiceImpl<BasesetDao, Base
...
@@ -31,13 +33,34 @@ public class BasesetServiceImpl extends AbstractCRUDServiceImpl<BasesetDao, Base
@Override
@Override
protected
void
findAfter
(
BasesetEntity
params
,
PageInfo
pageInfo
,
Context
context
,
List
<
BasesetEntity
>
list
)
throws
AppException
{
protected
void
findAfter
(
BasesetEntity
params
,
PageInfo
pageInfo
,
Context
context
,
List
<
BasesetEntity
>
list
)
throws
AppException
{
list
.
forEach
(
item
->
{
list
.
forEach
(
item
->
{
List
<
HotwordEntity
>
hotwordEntities
=
hotwordService
.
find
(
new
HotwordQuery
().
siteId
(
item
.
getSiteId
()));
List
<
HotwordEntity
>
hotwordEntities
=
hotwordService
.
find
(
new
HotwordQuery
().
siteId
(
item
.
getSiteId
()));
item
.
setHotwordList
(
hotwordEntities
);
item
.
setHotwordList
(
hotwordEntities
);
});
});
super
.
findAfter
(
params
,
pageInfo
,
context
,
list
);
}
@Override
protected
void
saveAfter
(
BasesetEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getHotwordList
())){
//更新新增热门词汇
entity
.
getHotwordList
().
forEach
(
item
->
{
HotwordEntity
hotwordEntity
=
hotwordService
.
selectOne
(
new
HotwordQuery
().
siteId
(
item
.
getSiteId
()).
hotwords
(
item
.
getHotwords
()));
if
(!
ObjectUtils
.
isEmpty
(
hotwordEntity
))
{
item
.
setId
(
hotwordEntity
.
getId
());
item
.
setSearchCount
(
hotwordEntity
.
getSearchCount
());
item
.
setUpdateTime
(
new
Date
());
hotwordService
.
update
(
item
,
context
);
}
else
{
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateTime
(
new
Date
());
hotwordService
.
save
(
item
,
context
);
}
});
}
super
.
findAfter
(
params
,
pageInfo
,
context
,
list
);
super
.
saveAfter
(
entity
,
context
);
}
}
}
}
\ No newline at end of file
fill-manager/src/test/java/com/mortals/httpclient/hotword/HotwordController.http
View file @
3b73fcce
...
@@ -55,11 +55,11 @@ Content-Type: application/json
...
@@ -55,11 +55,11 @@ Content-Type: application/json
"siteId": 3,
"siteId": 3,
"hotwords": "测试1",
"hotwords": "测试1",
"searchCount": 0,
"searchCount": 0,
"wordsSource":
1
"wordsSource":
0
},
},
{
{
"siteId": 3,
"siteId": 3,
"hotwords": "测试
2
",
"hotwords": "测试
3
",
"searchCount": 0,
"searchCount": 0,
"wordsSource": 1
"wordsSource": 1
}
}
...
...
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