Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
event
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
陈世强
event
Commits
a59b0f72
提交
a59b0f72
authored
2月 27, 2025
作者:
yanxin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
专题启用增加复合专题redis入库处理逻辑
上级
9c91f2d1
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
17 行增加
和
3 行删除
+17
-3
SubjectMapper.java
src/main/java/com/zzsn/event/mapper/SubjectMapper.java
+4
-0
SubjectMapper.xml
src/main/java/com/zzsn/event/mapper/xml/SubjectMapper.xml
+4
-0
SubjectServiceImpl.java
.../java/com/zzsn/event/service/impl/SubjectServiceImpl.java
+9
-3
没有找到文件。
src/main/java/com/zzsn/event/mapper/SubjectMapper.java
浏览文件 @
a59b0f72
...
@@ -10,6 +10,8 @@ import com.zzsn.event.vo.SubjectDetailVO;
...
@@ -10,6 +10,8 @@ import com.zzsn.event.vo.SubjectDetailVO;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
/**
* @Description: 专题表
* @Description: 专题表
* @Author: jeecg-boot
* @Author: jeecg-boot
...
@@ -98,4 +100,6 @@ public interface SubjectMapper extends BaseMapper<Subject> {
...
@@ -98,4 +100,6 @@ public interface SubjectMapper extends BaseMapper<Subject> {
* @date 2024/4/24
* @date 2024/4/24
*/
*/
int
ynBelowExcludeGroup
(
@Param
(
"subjectId"
)
String
subjectId
,
@Param
(
"sourceId"
)
String
sourceId
);
int
ynBelowExcludeGroup
(
@Param
(
"subjectId"
)
String
subjectId
,
@Param
(
"sourceId"
)
String
sourceId
);
List
<
String
>
getBindSubjectIds
(
@Param
(
"id"
)
String
id
);
}
}
src/main/java/com/zzsn/event/mapper/xml/SubjectMapper.xml
浏览文件 @
a59b0f72
...
@@ -206,4 +206,8 @@
...
@@ -206,4 +206,8 @@
</otherwise>
</otherwise>
</choose>
</choose>
</select>
</select>
<select
id=
"getBindSubjectIds"
resultType=
"java.lang.String"
>
select addition_relation_id from subject_addition where subject_id = #{id} and addition_type = 1
</select>
</mapper>
</mapper>
src/main/java/com/zzsn/event/service/impl/SubjectServiceImpl.java
浏览文件 @
a59b0f72
...
@@ -58,7 +58,8 @@ import java.util.stream.Collectors;
...
@@ -58,7 +58,8 @@ import java.util.stream.Collectors;
@Service
@Service
@Slf4j
@Slf4j
public
class
SubjectServiceImpl
extends
ServiceImpl
<
SubjectMapper
,
Subject
>
implements
SubjectService
{
public
class
SubjectServiceImpl
extends
ServiceImpl
<
SubjectMapper
,
Subject
>
implements
SubjectService
{
@Autowired
private
InformationService
informationService
;
@Autowired
@Autowired
private
CodeGenerateUtil
codeGenerateUtil
;
private
CodeGenerateUtil
codeGenerateUtil
;
@Autowired
@Autowired
...
@@ -242,9 +243,14 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
...
@@ -242,9 +243,14 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
if
(
byId
.
getFirstOpenTime
()
==
null
)
{
if
(
byId
.
getFirstOpenTime
()
==
null
)
{
updateWrapper
.
set
(
Subject:
:
getFirstOpenTime
,
new
Date
());
updateWrapper
.
set
(
Subject:
:
getFirstOpenTime
,
new
Date
());
updateWrapper
.
set
(
Subject:
:
getEstimateStatus
,
"预估中"
);
updateWrapper
.
set
(
Subject:
:
getEstimateStatus
,
"预估中"
);
//第一次启用时,添加redis缓存,,用于向专题里进数据
//第一次启用时,添加redis缓存,,用于向专题里进数据
setRedisCache
(
subjectId
);
if
(
byId
.
getSubjectType
()
==
3
){
//复合专题根据绑定的专题数据时间确定要入库的数据时间范围
List
<
String
>
ids
=
this
.
baseMapper
.
getBindSubjectIds
(
byId
.
getId
());
informationService
.
supplyByCondition
(
subjectId
,
ids
);
}
else
{
setRedisCache
(
subjectId
);
}
}
}
}
}
this
.
update
(
updateWrapper
);
this
.
update
(
updateWrapper
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论