From db05e7296bcef514ae3f204971ebbdd502019041 Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期五, 10 五月 2024 13:30:33 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
framework/src/main/java/com/yuanchu/mom/service/impl/InformationNotificationServiceImpl.java | 29 +++++++++++++++++++++--------
1 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/framework/src/main/java/com/yuanchu/mom/service/impl/InformationNotificationServiceImpl.java b/framework/src/main/java/com/yuanchu/mom/service/impl/InformationNotificationServiceImpl.java
index 153c74a..7572a05 100644
--- a/framework/src/main/java/com/yuanchu/mom/service/impl/InformationNotificationServiceImpl.java
+++ b/framework/src/main/java/com/yuanchu/mom/service/impl/InformationNotificationServiceImpl.java
@@ -31,7 +31,8 @@
@Override
public IPage<InformationNotificationDto> getPage(Page page, String messageType) {
- return baseMapper.getPage(page, messageType);
+ Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter");
+ return baseMapper.getPage(page, messageType, map1.get("userId"));
}
@Override
@@ -50,12 +51,24 @@
@Override
public Boolean checkForUnreadData() {
- Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter");
- List<InformationNotification> informationNotifications = baseMapper.selectList(
- Wrappers.<InformationNotification>lambdaQuery()
- .eq(InformationNotification::getConsigneeId, map1.get("userId"))
- .eq(InformationNotification::getViewStatus, false)
- .last("limit 1"));
- return !informationNotifications.isEmpty();
+ Map<String, Integer> map1 = null;
+ try {
+ map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter");
+ List<InformationNotification> informationNotifications = baseMapper.selectList(
+ Wrappers.<InformationNotification>lambdaQuery()
+ .eq(InformationNotification::getConsigneeId, map1.get("userId"))
+ .eq(InformationNotification::getViewStatus, false)
+ .last("limit 1"));
+ return !informationNotifications.isEmpty();
+ } catch (Exception e) {
+ }
+ return false;
+ }
+
+ @Override
+ public void triggerModificationStatusToRead(Integer id) {
+ baseMapper.update(new InformationNotification(), Wrappers.<InformationNotification>lambdaUpdate()
+ .eq(InformationNotification::getId, id)
+ .set(InformationNotification::getViewStatus, true));
}
}
--
Gitblit v1.9.3