Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
event
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
陈世强
event
Commits
470b0563
提交
470b0563
authored
7月 14, 2025
作者:
925993793@qq.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[fix] 研究中心-自定义专题参数校验bug修改
上级
c8ae44dc
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
27 行增加
和
17 行删除
+27
-17
SubjectMapper.xml
src/main/java/com/zzsn/event/mapper/xml/SubjectMapper.xml
+2
-0
SubjectSimpleServiceImpl.java
...com/zzsn/event/service/impl/SubjectSimpleServiceImpl.java
+18
-15
SubjectDetailVO.java
src/main/java/com/zzsn/event/vo/SubjectDetailVO.java
+2
-0
SubjectParamsCheckVO.java
src/main/java/com/zzsn/event/vo/SubjectParamsCheckVO.java
+5
-2
没有找到文件。
src/main/java/com/zzsn/event/mapper/xml/SubjectMapper.xml
浏览文件 @
470b0563
...
@@ -254,6 +254,7 @@
...
@@ -254,6 +254,7 @@
<result
column=
"time_enable"
property=
"timeEnable"
/>
<result
column=
"time_enable"
property=
"timeEnable"
/>
<result
column=
"time_disable"
property=
"timeDisable"
/>
<result
column=
"time_disable"
property=
"timeDisable"
/>
<result
column=
"library"
property=
"library"
/>
<result
column=
"library"
property=
"library"
/>
<result
column=
"data_scope"
property=
"dataScope"
/>
<result
column=
"face_public"
property=
"facePublic"
/>
<result
column=
"face_public"
property=
"facePublic"
/>
<result
column=
"first_open_time"
property=
"firstOpenTime"
/>
<result
column=
"first_open_time"
property=
"firstOpenTime"
/>
<result
column=
"estimate_status"
property=
"estimateStatus"
/>
<result
column=
"estimate_status"
property=
"estimateStatus"
/>
...
@@ -273,6 +274,7 @@
...
@@ -273,6 +274,7 @@
s.data_source,
s.data_source,
s.face_public,
s.face_public,
s.library,
s.library,
s.data_scope,
s.estimate_status,
s.estimate_status,
s.first_open_time,
s.first_open_time,
c.id as subjectTypeId,
c.id as subjectTypeId,
...
...
src/main/java/com/zzsn/event/service/impl/SubjectSimpleServiceImpl.java
浏览文件 @
470b0563
...
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
...
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.zzsn.event.constant.Constants
;
import
com.zzsn.event.constant.Constants
;
import
com.zzsn.event.entity.*
;
import
com.zzsn.event.entity.*
;
import
com.zzsn.event.enums.BindTypeEnum
;
import
com.zzsn.event.enums.CodePrefixEnum
;
import
com.zzsn.event.enums.CodePrefixEnum
;
import
com.zzsn.event.feign.api.RemoteModelService
;
import
com.zzsn.event.feign.api.RemoteModelService
;
import
com.zzsn.event.service.*
;
import
com.zzsn.event.service.*
;
...
@@ -252,7 +253,7 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
...
@@ -252,7 +253,7 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
return
false
;
return
false
;
}
}
//判断信息源标签配置是否变化,变化则校验不通过;反之通过
//判断信息源标签配置是否变化,变化则校验不通过;反之通过
boolean
judgeInfoSourceLabel
=
judgeInfoSourceLabel
(
subjectId
,
subjectParamsCheckVO
.
getSubjectSourceTag
VO
());
boolean
judgeInfoSourceLabel
=
judgeInfoSourceLabel
(
subjectId
,
subjectDetailVO
.
getDataScope
(),
subjectParamsCheckVO
.
getDataScope
(),
subjectParamsCheckVO
.
getInfoSourceMainLabel
VO
());
//判断定向信息源是否发生变化(前端传参),true 是;false 否
//判断定向信息源是否发生变化(前端传参),true 是;false 否
boolean
directSourceChange
=
subjectParamsCheckVO
.
isDirectSourceChange
();
boolean
directSourceChange
=
subjectParamsCheckVO
.
isDirectSourceChange
();
return
!
judgeInfoSourceLabel
&&
!
directSourceChange
;
return
!
judgeInfoSourceLabel
&&
!
directSourceChange
;
...
@@ -300,33 +301,34 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
...
@@ -300,33 +301,34 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
* 判断信息源配置是否发生变化 true 是;false 否
* 判断信息源配置是否发生变化 true 是;false 否
*
*
* @param subjectId 专题id
* @param subjectId 专题id
* @param
subjectSourceTag
VO 信息源标签信息(编辑时前端传参)
* @param
infoSourceMainLabel
VO 信息源标签信息(编辑时前端传参)
* @author lkg
* @author lkg
* @date 2025/2/5
* @date 2025/2/5
*/
*/
private
boolean
judgeInfoSourceLabel
(
String
subjectId
,
SubjectSourceTagVO
subjectSourceTag
VO
)
{
private
boolean
judgeInfoSourceLabel
(
String
subjectId
,
Integer
oldDataScope
,
Integer
newDataScope
,
InfoSourceMainLabelVO
infoSourceMainLabel
VO
)
{
boolean
flag
=
false
;
boolean
flag
=
false
;
if
(
oldDataScope
==
null
)
{
oldDataScope
=
0
;
}
//是否全选,判断绑定的信息源标签是否发生变化
if
(!
Objects
.
equals
(
newDataScope
,
oldDataScope
))
{
flag
=
true
;
}
else
{
LambdaQueryWrapper
<
SubjectInfoSourceMap
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
SubjectInfoSourceMap
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
queryWrapper
.
eq
(
SubjectInfoSourceMap:
:
getSubjectId
,
subjectId
);
queryWrapper
.
eq
(
SubjectInfoSourceMap:
:
getSubjectId
,
subjectId
);
List
<
SubjectInfoSourceMap
>
mapList
=
subjectInfoSourceMapService
.
list
(
queryWrapper
);
List
<
SubjectInfoSourceMap
>
mapList
=
subjectInfoSourceMapService
.
list
(
queryWrapper
);
//判断绑定的信息源标签是否发生变化
//判断绑定的信息源标签是否发生变化
if
(
CollectionUtils
.
isEmpty
(
mapList
))
{
if
(
CollectionUtils
.
isEmpty
(
mapList
))
{
if
(
subjectSourceTagVO
!=
null
)
{
if
(
infoSourceMainLabelVO
!=
null
&&
infoSourceMainLabelVO
.
getInfoSourceLabelItemList
().
size
()
>
0
)
{
flag
=
true
;
flag
=
true
;
}
}
}
else
{
}
else
{
//判断 是否绑定信息源标签
//判断 是否绑定信息源标签
Set
<
String
>
sourceLabelCodeSet
=
mapList
.
stream
().
filter
(
e
->
e
.
getType
()
==
12
).
map
(
SubjectInfoSourceMap:
:
getSourceItemId
).
collect
(
Collectors
.
toSet
());
List
<
String
>
sourceLabelCodeList
=
mapList
.
stream
().
filter
(
e
->
Objects
.
equals
(
e
.
getType
(),
BindTypeEnum
.
INFO_SOURCE_MAIN_LABEL
.
getvalue
())).
map
(
SubjectInfoSourceMap:
:
getSourceItemId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
sourceLabelCodeSet
))
{
if
(
CollectionUtils
.
isNotEmpty
(
sourceLabelCodeList
))
{
if
(
subjectSourceTagVO
!=
null
)
{
if
(
infoSourceMainLabelVO
!=
null
)
{
Set
<
String
>
labelItemCodeSetAll
=
new
HashSet
<>();
List
<
String
>
labelItemCodeSetAll
=
infoSourceMainLabelVO
.
getInfoSourceLabelItemList
();
List
<
InfoSourceLabelVO
>
labelList
=
subjectSourceTagVO
.
getLabelList
();
if
(!
sourceLabelCodeList
.
equals
(
labelItemCodeSetAll
))
{
for
(
InfoSourceLabelVO
infoSourceLabelVO
:
labelList
)
{
List
<
InfoSourceLabelItemVO
>
infoSourceLabelItemList
=
infoSourceLabelVO
.
getInfoSourceLabelItemList
();
Set
<
String
>
labelItemCodeSet
=
infoSourceLabelItemList
.
stream
().
map
(
InfoSourceLabelItemVO:
:
getLabelItemCode
).
collect
(
Collectors
.
toSet
());
labelItemCodeSetAll
.
addAll
(
labelItemCodeSet
);
}
if
(!
sourceLabelCodeSet
.
equals
(
labelItemCodeSetAll
))
{
flag
=
true
;
flag
=
true
;
}
}
}
else
{
}
else
{
...
@@ -334,6 +336,7 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
...
@@ -334,6 +336,7 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
}
}
}
}
}
}
}
return
flag
;
return
flag
;
}
}
...
...
src/main/java/com/zzsn/event/vo/SubjectDetailVO.java
浏览文件 @
470b0563
...
@@ -37,6 +37,8 @@ public class SubjectDetailVO {
...
@@ -37,6 +37,8 @@ public class SubjectDetailVO {
private
Integer
dataSource
;
private
Integer
dataSource
;
/**划分专题库*/
/**划分专题库*/
private
String
library
;
private
String
library
;
/**是否全选(1-是;0-否)*/
private
Integer
dataScope
;
/**第一次启用时间*/
/**第一次启用时间*/
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
...
...
src/main/java/com/zzsn/event/vo/SubjectParamsCheckVO.java
浏览文件 @
470b0563
...
@@ -13,11 +13,14 @@ import java.util.List;
...
@@ -13,11 +13,14 @@ import java.util.List;
@Data
@Data
public
class
SubjectParamsCheckVO
{
public
class
SubjectParamsCheckVO
{
/**专题
新增
参数*/
/**专题
基本信息
参数*/
private
SubjectSimpleVO
subjectSimpleVO
;
private
SubjectSimpleVO
subjectSimpleVO
;
/**(信息源标签)是否全选(1-是;0-否)*/
private
Integer
dataScope
;
/**信息源标签*/
/**信息源标签*/
private
SubjectSourceTagVO
subjectSourceTag
VO
;
private
InfoSourceMainLabelVO
infoSourceMainLabel
VO
;
/**定向信息源是否发生变化*/
/**定向信息源是否发生变化*/
private
boolean
directSourceChange
;
private
boolean
directSourceChange
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论