From d09284975427910441eeaf59d34a4d50d2fd5fdc Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期二, 24 十二月 2024 19:02:29 +0800
Subject: [PATCH] 修改bug

---
 UserAHTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/SystemNoticeServiceImpl.java |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/UserAHTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/SystemNoticeServiceImpl.java b/UserAHTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/SystemNoticeServiceImpl.java
index 509814b..17840aa 100644
--- a/UserAHTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/SystemNoticeServiceImpl.java
+++ b/UserAHTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/SystemNoticeServiceImpl.java
@@ -4,11 +4,13 @@
 import com.stylefeng.guns.modular.system.dao.SystemNoticeMapper;
 import com.stylefeng.guns.modular.system.dao.TNoticesMapper;
 import com.stylefeng.guns.modular.system.model.SystemNotice;
+import com.stylefeng.guns.modular.system.model.TNotices;
 import com.stylefeng.guns.modular.system.service.ISystemNoticeService;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -77,8 +79,33 @@
         }
         return list;
     }
-
-
+    
+    
+    /**
+     * 获取系统消息详情
+     * @param type
+     * @param id
+     * @return
+     */
+    @Override
+    public Map<String, Object> queryNoticesInfo(Integer type, Integer id) {
+        Map<String, Object> map = new HashMap<>();
+        if(type == 1){//系统公告
+            SystemNotice systemNotice = systemNoticeMapper.selectById(id);
+            TNotices tNotices = tNoticesMapper.selectById(systemNotice.getNoticesId());
+            map.put("id", id);
+            map.put("title", tNotices.getTitle());
+            map.put("img", tNotices.getImgUrl());
+            map.put("content", tNotices.getContent());
+        }
+        if(type == 2){//系统消息
+            SystemNotice systemNotice = systemNoticeMapper.selectById(id);
+            map.put("id", id);
+            map.put("content", systemNotice.getContent());
+        }
+        return map;
+    }
+    
     /**
      * 阅读操作
      * @param id

--
Gitblit v1.7.1