From ed1fcd767127b6523ad0e07cb1f874a590e26509 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Fri, 30 Jul 2021 12:00:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=87=E8=AE=B0=E5=B7=B2=E8=AF=BB?= =?UTF-8?q?=E6=9C=AA=E8=AE=B0=E5=BD=95=E6=9F=A5=E7=9C=8B=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/mapper/ext/ExtSysMsgMapper.java | 4 +-- .../service/message/SysMsgService.java | 2 +- frontend/src/api/system/msg.js | 9 ++++++ frontend/src/views/msg/readed.vue | 28 +++++++++++++++++-- 4 files changed, 37 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/io/dataease/base/mapper/ext/ExtSysMsgMapper.java b/backend/src/main/java/io/dataease/base/mapper/ext/ExtSysMsgMapper.java index c86fa302b0..110b76dafb 100644 --- a/backend/src/main/java/io/dataease/base/mapper/ext/ExtSysMsgMapper.java +++ b/backend/src/main/java/io/dataease/base/mapper/ext/ExtSysMsgMapper.java @@ -16,13 +16,13 @@ public interface ExtSysMsgMapper { @Update({ "" }) - int batchStatus(@Param("msgIds") List msgIds); + int batchStatus(@Param("msgIds") List msgIds, @Param("time") Long time); @Delete({ diff --git a/backend/src/main/java/io/dataease/service/message/SysMsgService.java b/backend/src/main/java/io/dataease/service/message/SysMsgService.java index 58809cc63d..b43d1cf687 100644 --- a/backend/src/main/java/io/dataease/service/message/SysMsgService.java +++ b/backend/src/main/java/io/dataease/service/message/SysMsgService.java @@ -109,7 +109,7 @@ public class SysMsgService { } public void setBatchReaded(List msgIds) { - extSysMsgMapper.batchStatus(msgIds); + extSysMsgMapper.batchStatus(msgIds, System.currentTimeMillis()); } public void batchDelete(List msgIds) { diff --git a/frontend/src/api/system/msg.js b/frontend/src/api/system/msg.js index d84dba9cb9..83accc340f 100644 --- a/frontend/src/api/system/msg.js +++ b/frontend/src/api/system/msg.js @@ -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() { return request({ url: '/api/sys_msg/treeNodes', diff --git a/frontend/src/views/msg/readed.vue b/frontend/src/views/msg/readed.vue index 0866f44f88..f573391921 100644 --- a/frontend/src/views/msg/readed.vue +++ b/frontend/src/views/msg/readed.vue @@ -11,9 +11,16 @@ :pagination-config="paginationConfig" @select="select" @search="search" + @selection-change="handleSelectionChange" @sort-change="sortChange" > - + +