Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
a45bf858
提交
a45bf858
authored
7月 30, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 标记已读未记录查看时间
上级
82594e90
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
37 行增加
和
6 行删除
+37
-6
ExtSysMsgMapper.java
...ain/java/io/dataease/base/mapper/ext/ExtSysMsgMapper.java
+2
-2
SysMsgService.java
.../main/java/io/dataease/service/message/SysMsgService.java
+1
-1
msg.js
frontend/src/api/system/msg.js
+9
-0
readed.vue
frontend/src/views/msg/readed.vue
+25
-3
没有找到文件。
backend/src/main/java/io/dataease/base/mapper/ext/ExtSysMsgMapper.java
浏览文件 @
a45bf858
...
@@ -17,13 +17,13 @@ public interface ExtSysMsgMapper {
...
@@ -17,13 +17,13 @@ public interface ExtSysMsgMapper {
@Update
({
@Update
({
"<script>"
,
"<script>"
,
"update sys_msg set status = 1 where msg_id in "
,
"update sys_msg set status = 1
, read_time = #{time}
where msg_id in "
,
"<foreach collection='msgIds' item='msgId' open='(' separator=',' close=')' >"
,
"<foreach collection='msgIds' item='msgId' open='(' separator=',' close=')' >"
,
" #{msgId}"
,
" #{msgId}"
,
"</foreach>"
,
"</foreach>"
,
"</script>"
"</script>"
})
})
int
batchStatus
(
@Param
(
"msgIds"
)
List
<
Long
>
msgIds
);
int
batchStatus
(
@Param
(
"msgIds"
)
List
<
Long
>
msgIds
,
@Param
(
"time"
)
Long
time
);
@Delete
({
@Delete
({
...
...
backend/src/main/java/io/dataease/service/message/SysMsgService.java
浏览文件 @
a45bf858
...
@@ -109,7 +109,7 @@ public class SysMsgService {
...
@@ -109,7 +109,7 @@ public class SysMsgService {
}
}
public
void
setBatchReaded
(
List
<
Long
>
msgIds
)
{
public
void
setBatchReaded
(
List
<
Long
>
msgIds
)
{
extSysMsgMapper
.
batchStatus
(
msgIds
);
extSysMsgMapper
.
batchStatus
(
msgIds
,
System
.
currentTimeMillis
()
);
}
}
public
void
batchDelete
(
List
<
Long
>
msgIds
)
{
public
void
batchDelete
(
List
<
Long
>
msgIds
)
{
...
...
frontend/src/api/system/msg.js
浏览文件 @
a45bf858
...
@@ -26,6 +26,15 @@ export function batchRead(data) {
...
@@ -26,6 +26,15 @@ export function batchRead(data) {
})
})
}
}
export
function
batchDelete
(
data
)
{
return
request
({
url
:
'/api/sys_msg/batchDelete'
,
method
:
'post'
,
loading
:
true
,
data
})
}
export
function
treeList
()
{
export
function
treeList
()
{
return
request
({
return
request
({
url
:
'/api/sys_msg/treeNodes'
,
url
:
'/api/sys_msg/treeNodes'
,
...
...
frontend/src/views/msg/readed.vue
浏览文件 @
a45bf858
...
@@ -11,9 +11,16 @@
...
@@ -11,9 +11,16 @@
:pagination-config=
"paginationConfig"
:pagination-config=
"paginationConfig"
@
select=
"select"
@
select=
"select"
@
search=
"search"
@
search=
"search"
@
selection-change=
"handleSelectionChange"
@
sort-change=
"sortChange"
@
sort-change=
"sortChange"
>
>
<template
#
toolbar
>
<el-button
:disabled=
"multipleSelection.length === 0"
@
click=
"deleteBatch"
>
{{
$t
(
'commons.delete'
)
}}
</el-button>
</
template
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
prop=
"content"
:label=
"$t('webmsg.content')"
>
<el-table-column
prop=
"content"
:label=
"$t('webmsg.content')"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
...
@@ -57,7 +64,7 @@
...
@@ -57,7 +64,7 @@
import
LayoutContent
from
'@/components/business/LayoutContent'
import
LayoutContent
from
'@/components/business/LayoutContent'
import
ComplexTable
from
'@/components/business/complex-table'
import
ComplexTable
from
'@/components/business/complex-table'
import
{
query
}
from
'@/api/system/msg'
import
{
query
,
batchDelete
}
from
'@/api/system/msg'
import
{
msgTypes
,
getTypeName
,
loadMsgTypes
}
from
'@/utils/webMsg'
import
{
msgTypes
,
getTypeName
,
loadMsgTypes
}
from
'@/utils/webMsg'
import
{
addOrder
,
formatOrders
}
from
'@/utils/index'
import
{
addOrder
,
formatOrders
}
from
'@/utils/index'
import
{
mapGetters
}
from
'vuex'
import
{
mapGetters
}
from
'vuex'
...
@@ -85,7 +92,8 @@ export default {
...
@@ -85,7 +92,8 @@ export default {
currentPage
:
1
,
currentPage
:
1
,
pageSize
:
10
,
pageSize
:
10
,
total
:
0
total
:
0
}
},
multipleSelection
:
[]
}
}
},
},
computed
:
{
computed
:
{
...
@@ -164,6 +172,20 @@ export default {
...
@@ -164,6 +172,20 @@ export default {
}
}
addOrder
({
field
:
prop
,
value
:
order
},
this
.
orderConditions
)
addOrder
({
field
:
prop
,
value
:
order
},
this
.
orderConditions
)
this
.
search
()
this
.
search
()
},
deleteBatch
()
{
if
(
this
.
multipleSelection
.
length
===
0
)
{
this
.
$warning
(
this
.
$t
(
'webmsg.please_select'
))
return
}
const
param
=
this
.
multipleSelection
.
map
(
item
=>
item
.
msgId
)
batchDelete
(
param
).
then
(
res
=>
{
this
.
$success
(
this
.
$t
(
'commons.delete_success'
))
this
.
search
()
})
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论