Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
8e573ba1
提交
8e573ba1
authored
10月 18, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 增加消失超时默认30天
上级
41d42372
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
40 行增加
和
5 行删除
+40
-5
ExcelReaderUtil.java
.../main/java/io/dataease/commons/utils/ExcelReaderUtil.java
+2
-2
SysMsgService.java
.../main/java/io/dataease/service/message/SysMsgService.java
+27
-0
index.vue
frontend/src/components/Notification/index.vue
+11
-3
没有找到文件。
backend/src/main/java/io/dataease/commons/utils/ExcelReaderUtil.java
浏览文件 @
8e573ba1
...
...
@@ -69,10 +69,10 @@ public class ExcelReaderUtil {
}
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
/*
public static void main(String[] args) throws Exception {
String file ="修改日期为mm-dd-yyyy.xlsx";
ExcelReaderUtil.readExcel(file, new FileInputStream("/Users/taojinlong/Desktop/" + file));
}
}
*/
}
backend/src/main/java/io/dataease/service/message/SysMsgService.java
浏览文件 @
8e573ba1
...
...
@@ -23,6 +23,7 @@ import org.springframework.cache.annotation.Cacheable;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -30,6 +31,8 @@ import java.util.stream.Collectors;
@Service
public
class
SysMsgService
{
private
static
final
long
overDays
=
30
;
@Resource
private
SysMsgMapper
sysMsgMapper
;
...
...
@@ -67,6 +70,8 @@ public class SysMsgService {
criteria
.
andStatusEqualTo
(
msgRequest
.
getStatus
());
}
criteria
.
andCreateTimeGreaterThanOrEqualTo
(
overTime
());
example
.
setOrderByClause
(
orderClause
);
List
<
SysMsg
>
sysMsgs
=
sysMsgMapper
.
selectByExample
(
example
);
return
sysMsgs
;
...
...
@@ -100,6 +105,8 @@ public class SysMsgService {
criteria
.
andStatusEqualTo
(
msgRequest
.
getStatus
());
}
criteria
.
andCreateTimeGreaterThanOrEqualTo
(
overTime
());
example
.
setOrderByClause
(
orderClause
);
List
<
MsgGridDto
>
msgGridDtos
=
extSysMsgMapper
.
queryGrid
(
example
);
return
msgGridDtos
;
...
...
@@ -109,6 +116,7 @@ public class SysMsgService {
SysMsgExample
example
=
new
SysMsgExample
();
SysMsgExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUserIdEqualTo
(
userId
).
andStatusEqualTo
(
false
);
criteria
.
andCreateTimeGreaterThanOrEqualTo
(
overTime
());
return
sysMsgMapper
.
countByExample
(
example
);
}
...
...
@@ -320,4 +328,23 @@ public class SysMsgService {
sysMsgMapper
.
updateByExampleSelective
(
record
,
example
);
}
public
Long
overTime
()
{
Long
currentTime
=
System
.
currentTimeMillis
();
long
oneDayTime
=
24
*
60
*
60
*
1000
;
long
temp
=
overDays
*
oneDayTime
;
return
currentTime
-
(
currentTime
+
8
*
60
*
60
*
1000
)
%
oneDayTime
-
temp
;
}
/* public static void main(String[] args) {
Long overTime = overTime();
System.out.println(overTime);
} */
}
frontend/src/components/Notification/index.vue
浏览文件 @
8e573ba1
...
...
@@ -49,15 +49,18 @@
</div>
</div>
<div
slot=
"reference"
>
<div>
<el-badge
:value=
"count || paginationConfig.total"
:hidden=
"!count && !paginationConfig.total"
:max=
"99"
class=
"item"
>
<svg-icon
class-name=
"notification"
icon-class=
"notification"
/>
</el-badge>
<!-- <div>
<svg-icon
class-name="notification"
icon-class="notification"
/>
<span v-if="count || paginationConfig.total" class="msg-number">{{ count || paginationConfig.total }}</span>
</div>
</div>
</el-popover>
</div>
-->
</div>
</el-popover>
</template>
<
script
>
...
...
@@ -275,4 +278,9 @@ export default {
background-color
:
#171422
;
}
}
.item
{
margin-top
:
0px
;
margin-right
:
5px
;
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论