Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
leader-base
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
张京坤
leader-base
Commits
8d227c55
提交
8d227c55
authored
3月 27, 2024
作者:
ZhangJingKun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
日志信息完善
上级
65ee8d21
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
47 行增加
和
6 行删除
+47
-6
CharacterDetailsController.java
...zsn/leaderbase/controller/CharacterDetailsController.java
+9
-0
CharacterInfoController.java
...m/zzsn/leaderbase/controller/CharacterInfoController.java
+21
-2
CharacterTagController.java
...om/zzsn/leaderbase/controller/CharacterTagController.java
+7
-1
LeaderCategoryController.java
.../zzsn/leaderbase/controller/LeaderCategoryController.java
+10
-3
没有找到文件。
src/main/java/com/zzsn/leaderbase/controller/CharacterDetailsController.java
浏览文件 @
8d227c55
...
...
@@ -7,6 +7,7 @@ import com.zzsn.leaderbase.service.LearningAchievementService;
import
com.zzsn.leaderbase.service.impl.CisXgraPaperServiceImpl
;
import
com.zzsn.leaderbase.util.EsUtil
;
import
com.zzsn.leaderbase.vo.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.*;
*/
@RestController
@RequestMapping
(
"/api/detail"
)
@Slf4j
public
class
CharacterDetailsController
{
//重要讲话 相关报道查询
...
...
@@ -46,6 +48,7 @@ public class CharacterDetailsController {
*/
@PostMapping
(
"/informationList"
)
public
Result
<?>
informationList
(
@RequestBody
DetailsListVo
detailsListVo
){
log
.
info
(
"重要讲话 相关报道查询:{}"
,
detailsListVo
.
toString
());
String
uid
=
detailsListVo
.
getUid
();
if
(
uid
==
null
||
""
.
equals
(
uid
))
...
...
@@ -78,6 +81,7 @@ public class CharacterDetailsController {
@RequestParam
(
name
=
"index"
,
required
=
false
)
String
index
,
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
){
log
.
info
(
"根据关联咨询索引和id查询咨询详情:{}---{}"
,
index
,
id
);
if
(
id
==
null
||
""
.
equals
(
id
))
return
Result
.
error
(
"id不能为空!"
);
if
(
index
==
null
||
""
.
equals
(
index
)){
...
...
@@ -103,6 +107,7 @@ public class CharacterDetailsController {
*/
@GetMapping
(
"/getCisXgraPaper"
)
public
Result
<?>
getCisXgraPaper
(
@RequestParam
(
name
=
"uid"
,
required
=
true
)
String
uid
){
log
.
info
(
"学术信息查询:{}"
,
uid
);
if
(
uid
==
null
||
""
.
equals
(
uid
))
Result
.
error
(
"人物id不能为空!"
);
return
cisXgraPaperService
.
getCisXgraPaper
(
uid
);
...
...
@@ -116,6 +121,7 @@ public class CharacterDetailsController {
*/
@PostMapping
(
"/getLearningAchievementList"
)
public
Result
<?>
getLearningAchievementList
(
@RequestBody
DetailsListVo
detailsListVo
){
log
.
info
(
"学术成果查询:{}"
,
detailsListVo
);
String
uid
=
detailsListVo
.
getUid
();
if
(
uid
==
null
||
""
.
equals
(
uid
))
return
Result
.
error
(
"人物id不能为空!"
);
...
...
@@ -141,6 +147,7 @@ public class CharacterDetailsController {
*/
@PostMapping
(
"/getCorrelationEnterpriseList"
)
public
Result
<?>
getCorrelationEnterpriseList
(
@RequestBody
DetailsListVo
detailsListVo
)
{
log
.
info
(
"相关企业查询:{}"
,
detailsListVo
);
String
uid
=
detailsListVo
.
getUid
();
if
(
uid
==
null
||
""
.
equals
(
uid
))
return
Result
.
error
(
"人物id不能为空!"
);
...
...
@@ -169,6 +176,7 @@ public class CharacterDetailsController {
@RequestParam
(
name
=
"uid"
,
required
=
true
)
String
uid
,
@RequestParam
(
name
=
"name"
,
required
=
true
)
String
name
)
{
log
.
info
(
"根据uid和人物名称从es库中查询从百度采集的人物信息:{}---{}"
,
uid
,
name
);
return
esServer
.
getCharacterBaike
(
uid
,
name
);
}
...
...
@@ -180,6 +188,7 @@ public class CharacterDetailsController {
*/
@PostMapping
(
"/getRelatedReportsList"
)
public
Result
<?>
getRelatedReportsList
(
@RequestBody
RelatedReportsVo
relatedReportsVo
)
{
log
.
info
(
"根据关键字从es中查询相关报道:{}"
,
relatedReportsVo
);
//参数校验
Integer
pageNo
=
relatedReportsVo
.
getPageNo
();
if
(
pageNo
<
1
)
...
...
src/main/java/com/zzsn/leaderbase/controller/CharacterInfoController.java
浏览文件 @
8d227c55
...
...
@@ -2,6 +2,7 @@ package com.zzsn.leaderbase.controller;
import
com.zzsn.leaderbase.service.CharacterInfoService
;
import
com.zzsn.leaderbase.vo.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -11,6 +12,7 @@ import org.springframework.web.bind.annotation.*;
* @Date: 2024/2/29 9:26
* @Content: 人物信息操作
*/
@Slf4j
@RestController
@RequestMapping
(
"/api/character"
)
public
class
CharacterInfoController
{
...
...
@@ -25,6 +27,7 @@ public class CharacterInfoController {
*/
@PostMapping
(
"/add"
)
public
Result
<?>
add
(
@RequestBody
CharacterVo
characterVo
){
log
.
info
(
"新增任务:{}"
,
characterVo
);
return
characterInfoService
.
add
(
characterVo
);
}
...
...
@@ -35,6 +38,7 @@ public class CharacterInfoController {
*/
@GetMapping
(
"getByUid"
)
public
Result
<?>
getByUid
(
@RequestParam
(
name
=
"uid"
,
required
=
true
)
String
uid
){
log
.
info
(
"根据人物uid查询人物信息:{}"
,
uid
);
return
characterInfoService
.
getByUid
(
uid
);
}
...
...
@@ -45,6 +49,7 @@ public class CharacterInfoController {
*/
@GetMapping
public
Result
<?>
getById
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
){
log
.
info
(
"根据人物id主键查询:{}"
,
id
);
return
characterInfoService
.
getById
(
id
);
}
...
...
@@ -55,6 +60,7 @@ public class CharacterInfoController {
*/
@PostMapping
(
"/edit"
)
public
Result
<?>
edit
(
@RequestBody
CharacterVo
characterVo
){
log
.
info
(
"根据人物id修改信息:{}"
,
characterVo
);
return
characterInfoService
.
edit
(
characterVo
);
}
...
...
@@ -65,16 +71,18 @@ public class CharacterInfoController {
*/
@GetMapping
(
"/del"
)
public
Result
<?>
del
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
){
log
.
info
(
"根据人物id主键删除:{}"
,
id
);
return
characterInfoService
.
del
(
id
);
}
/**
* 条件分页查询
*
人物信息
条件分页查询
* @param characterListVo
* @return
*/
@PostMapping
(
"/list"
)
public
Result
<?>
getList
(
@RequestBody
CharacterListVo
characterListVo
){
log
.
info
(
"人物信息条件分页查询:{}"
,
characterListVo
);
//参数校验
Integer
pageNo
=
characterListVo
.
getPageNo
();
Integer
pageSize
=
characterListVo
.
getPageSize
();
...
...
@@ -96,6 +104,7 @@ public class CharacterInfoController {
@GetMapping
(
"/checkList"
)
public
Result
<?>
checkList
(
@RequestParam
(
name
=
"articleId"
,
required
=
true
)
String
articleId
,
@RequestParam
(
name
=
"checkResultArr"
,
required
=
false
)
String
[]
checkResultArr
){
log
.
info
(
"审核界面根据关联资讯id 查询资讯关联的人物:{}---{}"
,
articleId
,
checkResultArr
);
if
(
articleId
==
null
&&
articleId
.
length
()
==
0
)
return
Result
.
error
(
"资讯id不能为空!"
);
return
characterInfoService
.
checkList
(
articleId
,
checkResultArr
);
...
...
@@ -111,11 +120,11 @@ public class CharacterInfoController {
@RequestParam
(
name
=
"name"
,
required
=
true
)
String
name
,
@RequestParam
(
name
=
"articleId"
,
required
=
true
)
String
articleId
){
log
.
info
(
"审核界面根据人物名称查询人物列表,排除当条数据:{}---{}---{}"
,
id
,
name
,
articleId
);
if
(
id
==
null
&&
id
.
length
()
==
0
)
return
Result
.
error
(
"id不能为空!"
);
if
(
id
==
null
)
return
Result
.
error
(
"name不能为空!"
);
return
characterInfoService
.
getListByName
(
id
,
name
,
articleId
);
}
...
...
@@ -154,6 +163,7 @@ public class CharacterInfoController {
*/
@PostMapping
(
"/merge"
)
public
Result
<?>
merge
(
@RequestBody
CharacterMergeVo
characterMergeVo
){
log
.
info
(
"人物合并:{}---{}---{}"
,
characterMergeVo
.
getType
(),
characterMergeVo
.
getOriginalId
(),
characterMergeVo
.
getNewId
());
return
characterInfoService
.
merge
(
characterMergeVo
);
}
...
...
@@ -165,6 +175,7 @@ public class CharacterInfoController {
*/
@GetMapping
(
"/mergeCancel"
)
public
Result
<?>
mergeCancel
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
){
log
.
info
(
"取消人物合并:{}"
,
id
);
return
characterInfoService
.
mergeCancel
(
id
);
}
...
...
@@ -175,6 +186,7 @@ public class CharacterInfoController {
*/
@GetMapping
(
"/getPreviousDuty"
)
public
Result
<?>
getPreviousDuty
(
@RequestParam
(
name
=
"uid"
,
required
=
true
)
String
uid
){
log
.
info
(
"根据uid查询人物的历任职务:{}"
,
uid
);
return
characterInfoService
.
getPreviousDuty
(
uid
);
}
...
...
@@ -185,11 +197,18 @@ public class CharacterInfoController {
*/
@PostMapping
(
"/correlation"
)
public
Result
<?>
correlation
(
@RequestBody
CharacterVo
characterVo
){
log
.
info
(
"关联:{}"
,
characterVo
.
getId
());
return
characterInfoService
.
correlation
(
characterVo
);
}
/**
* 修改关联人物
* @param characterVo
* @return
*/
@PostMapping
(
"/correlationEdit"
)
public
Result
<?>
correlationEdit
(
@RequestBody
CharacterVo
characterVo
){
log
.
info
(
"修改关联人物:{}"
,
characterVo
.
getId
());
return
characterInfoService
.
correlationEdit
(
characterVo
);
}
...
...
src/main/java/com/zzsn/leaderbase/controller/CharacterTagController.java
浏览文件 @
8d227c55
...
...
@@ -2,6 +2,7 @@ package com.zzsn.leaderbase.controller;
import
com.zzsn.leaderbase.service.CharacterTagService
;
import
com.zzsn.leaderbase.vo.Result
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -18,6 +19,7 @@ import java.util.List;
* @Date: 2024/3/20 18:26
* @Content:
*/
@Slf4j
@RestController
@RequestMapping
(
"/api/tag"
)
public
class
CharacterTagController
{
...
...
@@ -36,6 +38,7 @@ public class CharacterTagController {
@GetMapping
(
"/getTagList"
)
public
Result
<?>
getTagList
(
@RequestParam
(
name
=
"type"
,
required
=
false
)
String
type
,
@RequestParam
(
name
=
"category"
,
required
=
false
)
String
category
){
log
.
info
(
"查询标签列表:{}---{}"
,
type
,
category
);
return
characterTagService
.
getTagList
(
type
,
category
);
}
...
...
@@ -48,6 +51,7 @@ public class CharacterTagController {
public
Result
<?>
getCharacterListByTag
(
@RequestParam
(
name
=
"tagName"
,
required
=
true
)
String
tagName
,
@RequestParam
(
name
=
"pageNo"
,
required
=
false
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
required
=
false
)
Integer
pageSize
){
log
.
info
(
"根据标签分页查询人物:{}---{}---{}"
,
tagName
,
pageNo
,
pageSize
);
if
(
pageNo
==
null
&&
pageNo
<
1
)
pageNo
=
1
;
if
(
pageSize
==
null
&&
pageSize
<
0
)
...
...
@@ -59,6 +63,8 @@ public class CharacterTagController {
//热门标签
@GetMapping
(
"/getTopTag"
)
public
Result
<?>
getTopTag
(){
return
characterTagService
.
getTopTag
();
Result
result
=
characterTagService
.
getTopTag
();
log
.
info
(
"热门标签:{}"
,
result
.
getResult
());
return
result
;
}
}
src/main/java/com/zzsn/leaderbase/controller/LeaderCategoryController.java
浏览文件 @
8d227c55
...
...
@@ -4,6 +4,7 @@ package com.zzsn.leaderbase.controller;
import
com.zzsn.leaderbase.entity.CharacterCategoryStructure
;
import
com.zzsn.leaderbase.service.LeaderCategoryService
;
import
com.zzsn.leaderbase.vo.Result
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -18,6 +19,7 @@ import javax.servlet.http.HttpServletRequest;
* @author obcy
* @since 2024-02-27
*/
@Slf4j
@RestController
@RequestMapping
(
"/api/category"
)
public
class
LeaderCategoryController
{
...
...
@@ -29,6 +31,7 @@ public class LeaderCategoryController {
* */
@GetMapping
public
Result
<?>
getById
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
){
log
.
info
(
"根据id查询分类树:{}"
,
id
);
return
Result
.
OK
(
leaderCategoryService
.
getById
(
id
));
}
...
...
@@ -37,6 +40,7 @@ public class LeaderCategoryController {
*/
@PostMapping
(
"/add"
)
public
Result
<?>
add
(
@RequestBody
CharacterCategoryStructure
characterCategoryStructure
){
log
.
info
(
"新增分类树:{}"
,
characterCategoryStructure
);
return
leaderCategoryService
.
add
(
characterCategoryStructure
);
}
/**
...
...
@@ -44,6 +48,7 @@ public class LeaderCategoryController {
* */
@PostMapping
(
"/edit"
)
public
Result
<?>
edit
(
@RequestBody
CharacterCategoryStructure
characterCategoryStructure
){
log
.
info
(
"编辑分类树:{}"
,
characterCategoryStructure
);
return
leaderCategoryService
.
edit
(
characterCategoryStructure
);
}
...
...
@@ -52,7 +57,8 @@ public class LeaderCategoryController {
* */
@GetMapping
(
"/del"
)
public
Result
<?>
del
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
){
return
leaderCategoryService
.
del
(
id
);
log
.
info
(
"删除分类树:{}"
,
id
);
return
leaderCategoryService
.
del
(
id
);
}
/**
...
...
@@ -68,8 +74,8 @@ public class LeaderCategoryController {
@RequestParam
(
name
=
"sign"
,
defaultValue
=
"1"
)
String
sign
,
@RequestParam
(
name
=
"category"
,
required
=
false
)
String
category
,
@RequestParam
(
name
=
"pid"
,
defaultValue
=
"0"
)
String
pid
,
HttpServletRequest
httpServletRequest
){
HttpServletRequest
httpServletRequest
){
log
.
info
(
"查询分类树列表:{}---{}---{}"
,
sign
,
category
,
pid
);
if
(!
"1"
.
equals
(
sign
)){
if
(
StringUtils
.
isBlank
(
pid
)){
return
Result
.
error
(
"查询非顶级节点列表时需要pid参数"
);
...
...
@@ -91,6 +97,7 @@ public class LeaderCategoryController {
@RequestParam
(
name
=
"category"
,
required
=
false
)
String
category
,
@RequestParam
(
name
=
"typeName"
,
required
=
false
)
String
typeName
){
log
.
info
(
"根据名称模糊查询所有节点及父节点:{}---{}"
,
category
,
typeName
);
if
(
typeName
==
null
||
""
.
equals
(
typeName
)){
//查询全部数据封装成树
return
leaderCategoryService
.
getAll
(
category
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论