Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
event
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
陈世强
event
Commits
33cf89ef
提交
33cf89ef
authored
4月 01, 2025
作者:
925993793@qq.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.专题绑定标签(数据字典)功能
2.文件导入资讯,增加默认索引
上级
5e15cde4
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
343 行增加
和
39 行删除
+343
-39
FileController.java
src/main/java/com/zzsn/event/controller/FileController.java
+1
-1
InformationController.java
...m/zzsn/event/controller/common/InformationController.java
+17
-4
RelationBindController.java
.../zzsn/event/controller/common/RelationBindController.java
+27
-0
StatisticalAnalysisController.java
...vent/controller/common/StatisticalAnalysisController.java
+3
-3
SubjectAPi.java
...n/java/com/zzsn/event/controller/thirdApi/SubjectAPi.java
+0
-22
InfoSource.java
src/main/java/com/zzsn/event/entity/InfoSource.java
+0
-3
SubjectDictMap.java
src/main/java/com/zzsn/event/entity/SubjectDictMap.java
+55
-0
SubjectDictMapMapper.java
...main/java/com/zzsn/event/mapper/SubjectDictMapMapper.java
+32
-0
SubjectDictMapMapper.xml
...n/java/com/zzsn/event/mapper/xml/SubjectDictMapMapper.xml
+20
-0
InformationService.java
src/main/java/com/zzsn/event/service/InformationService.java
+11
-0
SubjectDictMapService.java
...in/java/com/zzsn/event/service/SubjectDictMapService.java
+34
-0
InformationServiceImpl.java
...a/com/zzsn/event/service/impl/InformationServiceImpl.java
+47
-6
SubjectDictMapServiceImpl.java
...om/zzsn/event/service/impl/SubjectDictMapServiceImpl.java
+52
-0
DataBindLabelFrom.java
src/main/java/com/zzsn/event/vo/DataBindLabelFrom.java
+25
-0
SubjectBindLabelParam.java
src/main/java/com/zzsn/event/vo/SubjectBindLabelParam.java
+19
-0
没有找到文件。
src/main/java/com/zzsn/event/controller/FileController.java
浏览文件 @
33cf89ef
...
...
@@ -294,7 +294,7 @@ public class FileController {
*/
@GetMapping
(
"/downloadResearchTemplate"
)
public
void
downloadResearchTemplate
(
HttpServletResponse
response
)
{
String
filePath
=
"subjectDataImport/上传Excel模板.xls"
;
String
filePath
=
"subjectDataImport/上传Excel模板.xls
x
"
;
commonService
.
downloadTemplate
(
response
,
filePath
);
}
...
...
src/main/java/com/zzsn/event/controller/common/InformationController.java
浏览文件 @
33cf89ef
...
...
@@ -12,9 +12,8 @@ import com.zzsn.event.entity.SubjectUserCondition;
import
com.zzsn.event.enums.LabelTypeEnum
;
import
com.zzsn.event.es.EsService
;
import
com.zzsn.event.service.*
;
import
com.zzsn.event.util.HttpUtil
;
import
com.zzsn.event.util.PythonUtil
;
import
com.zzsn.event.util.
user.AuthUtil
;
import
com.zzsn.event.util.
tree.Node
;
import
com.zzsn.event.util.user.UserUtil
;
import
com.zzsn.event.util.user.UserVo
;
import
com.zzsn.event.vo.*
;
...
...
@@ -24,11 +23,9 @@ import org.apache.commons.collections4.CollectionUtils;
import
org.apache.commons.lang3.StringUtils
;
import
org.jsoup.Jsoup
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.CompletableFuture
;
...
...
@@ -56,6 +53,8 @@ public class InformationController {
@Autowired
private
SysBaseLabelTypeService
sysBaseLabelTypeService
;
@Autowired
private
SubjectDictMapService
subjectDictMapService
;
@Autowired
private
PythonUtil
pythonUtil
;
...
...
@@ -349,6 +348,20 @@ public class InformationController {
}
/**
* 编辑标签
*
* @param bindLabelFrom 参数
* @author lkg
* @date 2024/12/19
*/
@PostMapping
(
value
=
"/modifyLabel"
)
public
Result
<?>
modifyLabel
(
@RequestBody
DataBindLabelFrom
bindLabelFrom
)
{
List
<
Node
>
nodes
=
subjectDictMapService
.
boundList
(
bindLabelFrom
.
getSubjectId
());
informationService
.
modifyLabel
(
bindLabelFrom
,
nodes
);
return
Result
.
OK
();
}
/**
* 批量删除-专题库(逻辑删除)
*
* @param map 删除参数
...
...
src/main/java/com/zzsn/event/controller/common/RelationBindController.java
浏览文件 @
33cf89ef
...
...
@@ -47,6 +47,8 @@ public class RelationBindController {
private
InfoSourceGroupService
infoSourceGroupService
;
@Autowired
private
SubjectService
subjectService
;
@Autowired
private
SubjectDictMapService
subjectDictMapService
;
/**
* 项目列表
...
...
@@ -267,5 +269,30 @@ public class RelationBindController {
return
Result
.
OK
(
bindKeyWordsList
);
}
/**
* 专题绑定标签(用于人工打标)
*
* @param bindLabelParam 绑定参数
* @author lkg
* @date 2025/3/28
*/
@PostMapping
(
"/bindLabels"
)
public
Result
<?>
bindLabels
(
@RequestBody
SubjectBindLabelParam
bindLabelParam
){
subjectDictMapService
.
modify
(
bindLabelParam
);
return
Result
.
OK
();
}
/**
* 专题已经绑定的标签(用于人工打标)
*
* @param subjectId 专题id
* @author lkg
* @date 2025/3/28
*/
@GetMapping
(
"/boundLabelList"
)
public
Result
<?>
boundLabelList
(
@RequestParam
String
subjectId
){
List
<
Node
>
boundList
=
subjectDictMapService
.
boundList
(
subjectId
);
return
Result
.
OK
(
boundList
);
}
}
src/main/java/com/zzsn/event/controller/common/StatisticalAnalysisController.java
浏览文件 @
33cf89ef
...
...
@@ -45,7 +45,7 @@ public class StatisticalAnalysisController {
@Autowired
private
ClbLabelService
clbLabelService
;
@Autowired
private
InformationService
informationService
;
private
InformationService
informationService
;
/**
* 概述分析
...
...
@@ -106,8 +106,8 @@ public class StatisticalAnalysisController {
public
Result
<
List
<
CountVO
>>
dataTrend
(
@RequestBody
InfoDataSearchCondition
searchCondition
)
{
List
<
CountVO
>
dataList
=
new
ArrayList
<>();
List
<
SysDictItem
>
dictItemList
=
sysDictItemService
.
listByDictCode
(
"Thematic_Library"
);
List
<
String
>
includeValues
=
dictItemList
.
stream
().
map
(
SysDictItem:
:
getItemValue
).
collect
(
Collectors
.
toList
()
);
searchCondition
.
setIncludeValues
(
includeValues
.
toArray
(
new
String
[
0
])
);
String
[]
includeValues
=
dictItemList
.
stream
().
map
(
SysDictItem:
:
getItemValue
).
toArray
(
String
[]::
new
);
searchCondition
.
setIncludeValues
(
includeValues
);
if
(
CollectionUtils
.
isEmpty
(
searchCondition
.
getIds
())
&&
searchCondition
.
getNum
()
==
null
)
{
dataList
=
esService
.
groupByDate
(
searchCondition
);
}
else
{
...
...
src/main/java/com/zzsn/event/controller/thirdApi/SubjectAPi.java
deleted
100644 → 0
浏览文件 @
5e15cde4
package
com
.
zzsn
.
event
.
controller
.
thirdApi
;
import
com.zzsn.event.constant.Result
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
*
*
* @author lkg
* @date 2025/2/20
*/
@Slf4j
@RestController
@RequestMapping
(
"/subject/api"
)
public
class
SubjectAPi
{
public
Result
<?>
pageList
(
String
name
,
Integer
type
){
return
null
;
}
}
src/main/java/com/zzsn/event/entity/InfoSource.java
浏览文件 @
33cf89ef
...
...
@@ -44,9 +44,6 @@ public class InfoSource implements Serializable {
/**国家*/
@ApiModelProperty
(
value
=
"国家"
)
private
String
country
;
/**是否境外*/
@ApiModelProperty
(
value
=
"是否境外"
)
private
String
ynOther
;
/**地区*/
@ApiModelProperty
(
value
=
"地区"
)
private
String
area
;
...
...
src/main/java/com/zzsn/event/entity/SubjectDictMap.java
0 → 100644
浏览文件 @
33cf89ef
package
com
.
zzsn
.
event
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.*
;
import
lombok.experimental.Accessors
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 专题-字典关系表
* @TableName subject_dict_map
*/
@Data
@TableName
(
"subject_dict_map"
)
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@Builder
@AllArgsConstructor
@NoArgsConstructor
public
class
SubjectDictMap
implements
Serializable
{
/**
* 主键id
*/
@TableId
(
"id"
)
private
String
id
;
/**
* 专题id
*/
@TableField
(
"subject_id"
)
private
String
subjectId
;
/**
* 字典id
*/
@TableField
(
"dict_id"
)
private
String
dictId
;
/**
* 创建人
*/
@TableField
(
"create_by"
)
private
String
createBy
;
/**
* 创建时间
*/
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@TableField
(
"create_time"
)
private
Date
createTime
;
}
src/main/java/com/zzsn/event/mapper/SubjectDictMapMapper.java
0 → 100644
浏览文件 @
33cf89ef
package
com
.
zzsn
.
event
.
mapper
;
import
com.zzsn.event.entity.SubjectDictMap
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.zzsn.event.util.tree.Node
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @author lenovo
* @description 针对表【subject_dict_map(专题-字典关系表)】的数据库操作Mapper
* @createDate 2025-03-28 11:56:32
* @Entity com.zzsn.event.entity.SubjectDictMap
*/
@Mapper
public
interface
SubjectDictMapMapper
extends
BaseMapper
<
SubjectDictMap
>
{
/**
* 专题绑定的数据字典信息
*
* @param subjectId 专题id
* @author lkg
* @date 2025/3/28
*/
List
<
Node
>
boundList
(
@Param
(
"subjectId"
)
String
subjectId
);
}
src/main/java/com/zzsn/event/mapper/xml/SubjectDictMapMapper.xml
0 → 100644
浏览文件 @
33cf89ef
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zzsn.event.mapper.SubjectDictMapMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.zzsn.event.entity.SubjectDictMap"
>
<id
property=
"id"
column=
"id"
jdbcType=
"VARCHAR"
/>
<result
property=
"subjectId"
column=
"subject_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"dictId"
column=
"dict_id"
jdbcType=
"INTEGER"
/>
<result
property=
"createBy"
column=
"create_by"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<select
id=
"boundList"
resultType=
"com.zzsn.event.util.tree.Node"
>
select d.id,d.dict_name as name from subject_dict_map m
inner join clb_system.sys_dict d on m.dict_id = d.id
where m.subject_id = #{subjectId}
</select>
</mapper>
src/main/java/com/zzsn/event/service/InformationService.java
浏览文件 @
33cf89ef
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.zzsn.event.constant.Result
;
import
com.zzsn.event.entity.ClbFileOperationLog
;
import
com.zzsn.event.util.tree.Node
;
import
com.zzsn.event.util.user.UserVo
;
import
com.zzsn.event.vo.*
;
import
com.zzsn.event.vo.es.DisplayInfo
;
...
...
@@ -123,6 +124,16 @@ public interface InformationService {
void
updateInfo
(
JSONObject
jsonObject
,
UserVo
userVo
);
/**
* 资讯绑定标签
*
* @param dataBindLabelFrom 绑定参数
* @param boundList 专题绑定的标签(数据字典)集合
* @author lkg
* @date 2025/3/31
*/
void
modifyLabel
(
DataBindLabelFrom
dataBindLabelFrom
,
List
<
Node
>
boundList
);
/**
* 审核
*
* @param map 审核参数
...
...
src/main/java/com/zzsn/event/service/SubjectDictMapService.java
0 → 100644
浏览文件 @
33cf89ef
package
com
.
zzsn
.
event
.
service
;
import
com.zzsn.event.entity.SubjectDictMap
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.zzsn.event.util.tree.Node
;
import
com.zzsn.event.vo.SubjectBindLabelParam
;
import
java.util.List
;
/**
* @author lenovo
* @description 针对表【subject_dict_map(专题-字典关系表)】的数据库操作Service
* @createDate 2025-03-28 11:56:32
*/
public
interface
SubjectDictMapService
extends
IService
<
SubjectDictMap
>
{
/**
* 专题绑定数据字典
*
* @param bindLabelParam 绑定参数
* @author lkg
* @date 2025/3/28
*/
void
modify
(
SubjectBindLabelParam
bindLabelParam
);
/**
* 专题绑定的数据字典信息
*
* @param subjectId 专题id
* @author lkg
* @date 2025/3/28
*/
List
<
Node
>
boundList
(
String
subjectId
);
}
src/main/java/com/zzsn/event/service/impl/InformationServiceImpl.java
浏览文件 @
33cf89ef
...
...
@@ -20,6 +20,7 @@ import com.zzsn.event.es.EsService;
import
com.zzsn.event.mapper.SubjectMapper
;
import
com.zzsn.event.service.*
;
import
com.zzsn.event.util.*
;
import
com.zzsn.event.util.tree.Node
;
import
com.zzsn.event.util.user.AuthUtil
;
import
com.zzsn.event.util.user.UserUtil
;
import
com.zzsn.event.util.user.UserVo
;
...
...
@@ -350,7 +351,7 @@ public class InformationServiceImpl implements InformationService {
info
.
setContent
(
contentNoTag2
);
}
info
.
setPublishDate
(
EsDateUtil
.
esFieldDateMapping
(
info
.
getPublishDate
()));
if
(
type
==
2
)
{
if
(
null
!=
type
&&
type
==
2
)
{
//获取附件信息
if
(
info
.
getAttachmentIds
()
!=
null
&&
info
.
getAttachmentIds
().
size
()
>
0
)
{
List
<
AttachmentInfo
>
attachmentInfoList
=
new
ArrayList
<>();
...
...
@@ -374,9 +375,8 @@ public class InformationServiceImpl implements InformationService {
info
.
setAttachmentInfos
(
attachmentInfoList
);
info
.
setYnArticle
(
false
);
}
CompletableFuture
.
runAsync
(()
->
addReadNum
(
info
,
index
));
}
CompletableFuture
.
runAsync
(()
->
addReadNum
(
info
,
index
));
return
info
;
}
...
...
@@ -610,6 +610,42 @@ public class InformationServiceImpl implements InformationService {
}
@Override
public
void
modifyLabel
(
DataBindLabelFrom
dataBindLabelFrom
,
List
<
Node
>
boundList
)
{
DisplayInfo
info
=
(
DisplayInfo
)
esOpUtil
.
getInfoById
(
dataBindLabelFrom
.
getIndex
(),
dataBindLabelFrom
.
getId
(),
DisplayInfo
.
class
);
if
(
info
!=
null
)
{
List
<
Label
>
newLabels
=
new
ArrayList
<>();
List
<
SysDictItem
>
dictItemList
=
dataBindLabelFrom
.
getDictItemList
();
for
(
SysDictItem
sysDictItem
:
dictItemList
)
{
Label
label
=
new
Label
();
label
.
setRelationId
(
sysDictItem
.
getId
());
label
.
setLabelMark
(
sysDictItem
.
getDictId
());
label
.
setRelationName
(
sysDictItem
.
getItemText
());
newLabels
.
add
(
label
);
}
List
<
Label
>
labels
=
info
.
getLabels
();
if
(
CollectionUtils
.
isNotEmpty
(
labels
))
{
List
<
String
>
dictIds
=
new
ArrayList
<>();
boundList
.
forEach
(
node
->
dictIds
.
add
(
node
.
getId
()));
List
<
Label
>
collect
=
labels
.
stream
().
filter
(
label
->
dictIds
.
contains
(
label
.
getLabelMark
())).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
collect
))
{
List
<
String
>
dictItemIds
=
new
ArrayList
<>();
dictItemList
.
forEach
(
sysDictItem
->
dictItemIds
.
add
(
sysDictItem
.
getId
()));
for
(
Label
label
:
collect
)
{
if
(
dictItemIds
.
contains
(
label
.
getRelationId
()))
{
newLabels
.
add
(
label
);
}
}
}
List
<
Label
>
otherCollect
=
labels
.
stream
().
filter
(
label
->
!
dictIds
.
contains
(
label
.
getLabelMark
())).
collect
(
Collectors
.
toList
());
newLabels
.
addAll
(
otherCollect
);
}
List
<
Label
>
finalList
=
newLabels
.
stream
().
collect
(
Collectors
.
collectingAndThen
(
Collectors
.
toMap
(
Label:
:
getRelationId
,
p
->
p
,
(
p1
,
p2
)
->
p1
),
map
->
new
ArrayList
<>(
map
.
values
())));
info
.
setLabels
(
finalList
);
esOpUtil
.
docUpdateById
(
dataBindLabelFrom
.
getIndex
(),
info
.
getId
(),
JSON
.
toJSONString
(
info
));
}
}
@Override
public
void
checkInfo
(
Map
<
String
,
Object
>
map
,
UserVo
userVo
)
{
List
<
Map
<
String
,
String
>>
ids
=
(
List
<
Map
<
String
,
String
>>)
map
.
get
(
"ids"
);
Integer
checkStatus
=
(
Integer
)
map
.
get
(
"checkStatus"
);
...
...
@@ -888,7 +924,7 @@ public class InformationServiceImpl implements InformationService {
}
specialInformation
.
setCreateDate
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
new
Date
(),
"yyyy-MM-dd'T'HH:mm:ss"
));
specialInformation
.
setProcessDate
(
specialInformation
.
getCreateDate
());
String
index
=
Constants
.
SUBJECT_INDEX
;
String
index
=
Constants
.
SUBJECT_INDEX
+
"_"
+
DateUtils
.
getYear
()
;
esOpUtil
.
docSavaByEntity
(
index
,
specialInformation
.
getId
(),
specialInformation
);
clbFileOperationLog
.
getClbFileOperationLogDetails
().
add
(
clbFileOperationLogDetailsService
.
buildFailDetails
(
info
.
get
(
1
),
info
.
get
(
5
),
info
.
get
(
7
)));
}
catch
(
NumberFormatException
e
)
{
...
...
@@ -903,7 +939,7 @@ public class InformationServiceImpl implements InformationService {
@Override
public
void
importDataInfo
(
List
<
List
<
String
>>
lists
,
String
subjectId
)
{
if
(
CollectionUtil
.
isNotEmpty
(
lists
))
{
String
index
=
Constants
.
SUBJECT_INDEX
;
String
index
=
Constants
.
SUBJECT_INDEX
+
"_"
+
DateUtils
.
getYear
()
;
List
<
SpecialInformation
>
dataList
=
new
ArrayList
<>();
for
(
List
<
String
>
info
:
lists
)
{
SpecialInformation
specialInformation
=
new
SpecialInformation
();
...
...
@@ -942,6 +978,7 @@ public class InformationServiceImpl implements InformationService {
specialInformation
.
setDeleteFlag
(
0
);
specialInformation
.
setTopNum
(
0
);
specialInformation
.
setDataFrom
(
1
);
specialInformation
.
setScore
(
0
D
);
specialInformation
.
setSubjectId
(
subjectId
);
String
format
=
DateUtil
.
dateToString
(
new
Date
(),
"yyyy-MM-dd'T'HH:mm:ss"
);
specialInformation
.
setCreateDate
(
format
);
...
...
@@ -1156,7 +1193,11 @@ public class InformationServiceImpl implements InformationService {
if
(
StringUtils
.
isNotEmpty
(
origin
))
{
LambdaQueryWrapper
<
InfoSource
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
queryWrapper
.
eq
(
InfoSource:
:
getSiteName
,
origin
);
InfoSource
infoSource
=
infoSourceService
.
getOne
(
queryWrapper
);
List
<
InfoSource
>
list
=
infoSourceService
.
list
(
queryWrapper
);
InfoSource
infoSource
=
null
;
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
infoSource
=
list
.
get
(
0
);
}
if
(
infoSource
!=
null
)
{
String
sid
=
infoSource
.
getId
();
sidList
.
add
(
sid
);
...
...
src/main/java/com/zzsn/event/service/impl/SubjectDictMapServiceImpl.java
0 → 100644
浏览文件 @
33cf89ef
package
com
.
zzsn
.
event
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.zzsn.event.entity.SubjectDictMap
;
import
com.zzsn.event.service.SubjectDictMapService
;
import
com.zzsn.event.mapper.SubjectDictMapMapper
;
import
com.zzsn.event.util.tree.Node
;
import
com.zzsn.event.vo.SubjectBindLabelParam
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author lenovo
* @description 针对表【subject_dict_map(专题-字典关系表)】的数据库操作Service实现
* @createDate 2025-03-28 11:56:32
*/
@Service
public
class
SubjectDictMapServiceImpl
extends
ServiceImpl
<
SubjectDictMapMapper
,
SubjectDictMap
>
implements
SubjectDictMapService
{
@Override
public
void
modify
(
SubjectBindLabelParam
bindLabelParam
)
{
String
subjectId
=
bindLabelParam
.
getSubjectId
();
List
<
String
>
dictIdList
=
bindLabelParam
.
getDictIdList
();
LambdaQueryWrapper
<
SubjectDictMap
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
queryWrapper
.
eq
(
SubjectDictMap:
:
getSubjectId
,
subjectId
);
int
count
=
this
.
count
(
queryWrapper
);
if
(
count
>
0
)
{
this
.
remove
(
queryWrapper
);
}
List
<
SubjectDictMap
>
subjectDictMaps
=
new
ArrayList
<>();
for
(
String
dictId
:
dictIdList
)
{
SubjectDictMap
subjectDictMap
=
new
SubjectDictMap
();
subjectDictMap
.
setSubjectId
(
subjectId
);
subjectDictMap
.
setDictId
(
dictId
);
subjectDictMaps
.
add
(
subjectDictMap
);
}
this
.
saveBatch
(
subjectDictMaps
);
}
@Override
public
List
<
Node
>
boundList
(
String
subjectId
)
{
return
baseMapper
.
boundList
(
subjectId
);
}
}
src/main/java/com/zzsn/event/vo/DataBindLabelFrom.java
0 → 100644
浏览文件 @
33cf89ef
package
com
.
zzsn
.
event
.
vo
;
import
com.zzsn.event.entity.SysDictItem
;
import
lombok.Data
;
import
java.util.List
;
/**
* 资讯绑定标签请求参数
*
* @author lkg
* @date 2025/3/28
*/
@Data
public
class
DataBindLabelFrom
{
/**索引*/
private
String
index
;
/**资讯id*/
private
String
id
;
/**专题id*/
private
String
subjectId
;
/**字典id*/
private
List
<
SysDictItem
>
dictItemList
;
}
src/main/java/com/zzsn/event/vo/SubjectBindLabelParam.java
0 → 100644
浏览文件 @
33cf89ef
package
com
.
zzsn
.
event
.
vo
;
import
lombok.Data
;
import
java.util.List
;
/**
* 专题绑定标签参数
*
* @author lkg
* @date 2025/3/28
*/
@Data
public
class
SubjectBindLabelParam
{
/**专题id*/
private
String
subjectId
;
/**数据字典id集合*/
private
List
<
String
>
dictIdList
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论