记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
f3de844a
Commit
f3de844a
authored
Jan 07, 2022
by
zhengfuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改热词问题
parent
6c7d1c1f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
6 deletions
+26
-6
GoblinFrontHotWordController.java
...troller/zhengzai/goblin/GoblinFrontHotWordController.java
+10
-3
GoblinFrontHotWordServiceImpl.java
...ai/goblin/service/impl/GoblinFrontHotWordServiceImpl.java
+16
-3
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/GoblinFrontHotWordController.java
View file @
f3de844a
...
...
@@ -47,10 +47,10 @@ public class GoblinFrontHotWordController extends BaseController {
return
error
(
"操作失败"
);
}
}
@PostMapping
(
"update"
)
@ApiOperation
(
value
=
"修改热词"
)
@PostMapping
(
"update
OrCreate
"
)
@ApiOperation
(
value
=
"修改
或者增加
热词"
)
@ResponseBody
public
AjaxResult
update
(
@RequestBody
GoblinFrontHotWordBuildParam
goblinFrontHotWordBuildParam
)
{
public
AjaxResult
update
OrCreate
(
@RequestBody
GoblinFrontHotWordBuildParam
goblinFrontHotWordBuildParam
)
{
GoblinFrontHotWord
goblinFrontHotWord
=
new
GoblinFrontHotWord
();
BeanUtils
.
copyProperties
(
goblinFrontHotWordBuildParam
,
goblinFrontHotWord
);
logger
.
info
(
"修改热词{}"
,
JSON
.
toJSONString
(
goblinFrontHotWord
));
...
...
@@ -61,6 +61,13 @@ public class GoblinFrontHotWordController extends BaseController {
return
error
(
"操作失败"
);
}
}
@PostMapping
(
"list"
)
@ApiOperation
(
value
=
"list"
)
@ResponseBody
public
AjaxResult
page
(
)
{
return
AjaxResult
.
success
(
goblinFrontHotWordService
.
list
());
}
@PostMapping
(
"delete"
)
@ApiOperation
(
value
=
"删除热词"
)
@ResponseBody
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/impl/GoblinFrontHotWordServiceImpl.java
View file @
f3de844a
...
...
@@ -63,9 +63,15 @@ public class GoblinFrontHotWordServiceImpl extends ServiceImpl<GoblinFrontHotWor
* @date 2021/12/27 下午4:03
*/
public
boolean
update
(
GoblinFrontHotWord
goblinFrontHotWord
){
goblinFrontHotWord
.
setUpdateTime
(
LocalDateTime
.
now
());
//数据库修改
goblinFrontHotWordMapper
.
updateById
(
goblinFrontHotWord
);
if
(
goblinFrontHotWord
.
getMid
()==
0
){
this
.
create
(
goblinFrontHotWord
);
}
else
{
goblinFrontHotWord
.
setUpdateTime
(
LocalDateTime
.
now
());
//数据库修改
goblinFrontHotWordMapper
.
updateById
(
goblinFrontHotWord
);
}
/*//mongodb修改
BasicDBObject orderObject = new BasicDBObject("$set", JSON.parse(JsonUtils.toJson(goblinFrontHotWord)));
mongoTemplate.getCollection(GoblinFrontHotWord.class.getSimpleName()).updateOne(
...
...
@@ -100,6 +106,13 @@ public class GoblinFrontHotWordServiceImpl extends ServiceImpl<GoblinFrontHotWor
this
.
update
(
goblinFrontHotWord
);
return
true
;
}
public
List
<
GoblinFrontHotWord
>
list
(){
LambdaQueryWrapper
<
GoblinFrontHotWord
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
GoblinFrontHotWord
.
class
);
queryWrapper
.
ne
(
GoblinFrontHotWord:
:
getDelTag
,
1
);
queryWrapper
.
orderByDesc
(
GoblinFrontHotWord:
:
getCreateTime
);
List
<
GoblinFrontHotWord
>
list
=
goblinFrontHotWordMapper
.
selectList
(
queryWrapper
);
return
list
;
}
/**
* @author zhangfuxin
* @Description:分页
...
...
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