From ee2bff3a8eaaafcea4675931db3b8c6ac04c273f Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期二, 25 二月 2025 15:37:51 +0800
Subject: [PATCH] 修改bug

---
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java
index 4af4426..840cc85 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java
@@ -20,6 +20,7 @@
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -34,7 +35,7 @@
  */
 @RestController
 @RequestMapping("/applet/home")
-@RequiredArgsConstructor
+@RequiredArgsConstructor(onConstructor_=@Lazy)
 @Api(tags = "首页相关接口")
 public class HomeController extends BaseController {
     private final IBannerService bannerService;
@@ -72,4 +73,13 @@
     public R<SystemUser> getCurrentUserInfo() {
         return R.ok(systemUserService.getSystemUserByPhone(getLoginUserInfo().getPhone()).orElse(null));
     }
+    /**
+     * 标记已读
+     */
+    @PostMapping("/read")
+    @ApiOperation("标记已读")
+    public R<?> read(){
+        messageNotificationService.read(getLoginUserInfo());
+        return R.ok();
+    }
 }

--
Gitblit v1.7.1