Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
event
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
陈世强
event
Commits
bbe9e116
提交
bbe9e116
authored
6月 09, 2025
作者:
925993793@qq.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
创建专题时,时间格式调整
上级
17657d06
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
40 行增加
和
10 行删除
+40
-10
SubjectManageController.java
...va/com/zzsn/event/controller/SubjectManageController.java
+2
-4
SubjectServiceImpl.java
.../java/com/zzsn/event/service/impl/SubjectServiceImpl.java
+21
-0
SubjectSimpleServiceImpl.java
...com/zzsn/event/service/impl/SubjectSimpleServiceImpl.java
+11
-0
SubjectPage.java
src/main/java/com/zzsn/event/vo/SubjectPage.java
+6
-6
没有找到文件。
src/main/java/com/zzsn/event/controller/SubjectManageController.java
浏览文件 @
bbe9e116
...
...
@@ -3,7 +3,6 @@ package com.zzsn.event.controller;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson2.JSON
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -777,7 +776,6 @@ public class SubjectManageController {
*/
@PostMapping
(
"/configScoreModel"
)
public
Result
<?>
configScoreModel
(
@RequestBody
ScoreModelVo
scoreModelVo
)
{
UserVo
loginUser
=
UserUtil
.
getLoginUser
();
scoreModelService
.
addOrUpdate
(
scoreModelVo
,
1
);
//调用接口,重新打分
String
subjectId
=
scoreModelVo
.
getSubjectId
();
...
...
@@ -819,7 +817,7 @@ public class SubjectManageController {
/**
* 模型绑定(包含去重、筛选、标签模型)--检查是否需要中断-专题配置页
*
todo
*
*
* @param subjectPage 参数
* @return
...
...
@@ -831,7 +829,7 @@ public class SubjectManageController {
/**
* 前端发送请求,传参数给python
*
todo
*
*/
@PostMapping
(
value
=
"/sendPythonInfo"
)
public
Result
<?>
sendPythonInfo
(
@RequestBody
SubjectPage
subjectPage
)
{
...
...
src/main/java/com/zzsn/event/service/impl/SubjectServiceImpl.java
浏览文件 @
bbe9e116
...
...
@@ -3,6 +3,7 @@ package com.zzsn.event.service.impl;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONUtil
;
...
...
@@ -372,6 +373,16 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
if
(
subject
.
getSubjectType
()
==
null
)
{
subject
.
setSubjectType
(
1
);
}
Date
timeEnable
=
subject
.
getTimeEnable
();
if
(
timeEnable
!=
null
)
{
String
format
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
timeEnable
,
"yyyy-MM-dd 00:00:00"
);
subject
.
setTimeEnable
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
parse
(
format
));
}
Date
timeDisable
=
subject
.
getTimeDisable
();
if
(
timeDisable
!=
null
)
{
String
format
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
timeDisable
,
"yyyy-MM-dd 23:59:59"
);
subject
.
setTimeDisable
(
DateUtil
.
parse
(
format
));
}
String
subjectCode
=
codeGenerateUtil
.
geneCodeNo
(
CodePrefixEnum
.
SUBJECT_DEFAULT
.
getValue
());
subject
.
setSubjectCode
(
subjectCode
);
String
cron
=
CronUtil
.
generateCron
(
subject
.
getUnit
(),
subject
.
getSpace
());
...
...
@@ -391,6 +402,16 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
BeanUtils
.
copyProperties
(
subjectPage
,
subject
);
String
cron
=
CronUtil
.
generateCron
(
subject
.
getUnit
(),
subject
.
getSpace
());
subject
.
setCron
(
cron
);
Date
timeEnable
=
subject
.
getTimeEnable
();
if
(
timeEnable
!=
null
)
{
String
format
=
DateUtil
.
format
(
timeEnable
,
"yyyy-MM-dd 00:00:00"
);
subject
.
setTimeEnable
(
DateUtil
.
parse
(
format
));
}
Date
timeDisable
=
subject
.
getTimeDisable
();
if
(
timeDisable
!=
null
)
{
String
format
=
DateUtil
.
format
(
timeDisable
,
"yyyy-MM-dd 23:59:59"
);
subject
.
setTimeDisable
(
DateUtil
.
parse
(
format
));
}
baseMapper
.
updateById
(
subject
);
//删除专题-类别绑定关系
subjectTypeMapService
.
deleteBySubjectId
(
subject
.
getId
());
...
...
src/main/java/com/zzsn/event/service/impl/SubjectSimpleServiceImpl.java
浏览文件 @
bbe9e116
package
com
.
zzsn
.
event
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson2.JSON
;
...
...
@@ -144,6 +145,16 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
if
(
subject
.
getSubjectType
()
==
null
)
{
subject
.
setSubjectType
(
1
);
}
Date
timeEnable
=
subject
.
getTimeEnable
();
if
(
timeEnable
!=
null
)
{
String
format
=
DateUtil
.
format
(
timeEnable
,
"yyyy-MM-dd 00:00:00"
);
subject
.
setTimeEnable
(
DateUtil
.
parse
(
format
));
}
Date
timeDisable
=
subject
.
getTimeDisable
();
if
(
timeDisable
!=
null
)
{
String
format
=
DateUtil
.
format
(
timeDisable
,
"yyyy-MM-dd 23:59:59"
);
subject
.
setTimeDisable
(
DateUtil
.
parse
(
format
));
}
String
subjectCode
=
codeGenerateUtil
.
geneCodeNo
(
CodePrefixEnum
.
SUBJECT_DEFAULT
.
getValue
());
subject
.
setSubjectCode
(
subjectCode
);
String
cron
=
CronUtil
.
generateCron
(
subject
.
getUnit
(),
subject
.
getSpace
());
...
...
src/main/java/com/zzsn/event/vo/SubjectPage.java
浏览文件 @
bbe9e116
...
...
@@ -53,15 +53,15 @@ public class SubjectPage {
/**数据来源(0-平台数据;1-全网搜)*/
private
Integer
dataSource
;
/**启用时间*/
@Excel
(
name
=
"启用时间"
,
width
=
15
,
format
=
"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
"
)
@Excel
(
name
=
"启用时间"
,
width
=
15
,
format
=
"yyyy-MM-dd"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@ApiModelProperty
(
value
=
"启用时间"
)
private
Date
timeEnable
;
/**停用时间*/
@Excel
(
name
=
"停用时间"
,
width
=
15
,
format
=
"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
"
)
@Excel
(
name
=
"停用时间"
,
width
=
15
,
format
=
"yyyy-MM-dd"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@ApiModelProperty
(
value
=
"停用时间"
)
private
Date
timeDisable
;
/**划分专题库*/
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论