From 879ce4e66b36daf44f79b17eb02d3578148e4545 Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期一, 24 二月 2025 18:56:20 +0800
Subject: [PATCH] 解决冲突

---
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java |    4 +++-
 1 files changed, 3 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 f151c92..4af4426 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
@@ -6,6 +6,7 @@
 import com.panzhihua.common.model.vos.R;
 import com.panzhihua.common.model.vos.sangeshenbian.SystemUserVo;
 import com.panzhihua.common.service.sangeshenbian.SystemUserService;
+import com.panzhihua.common.service.user.UserService;
 import com.panzhihua.sangeshenbian.model.entity.Banner;
 import com.panzhihua.sangeshenbian.model.entity.SystemUser;
 import com.panzhihua.sangeshenbian.model.query.BasePage;
@@ -40,6 +41,7 @@
     private final IMessageNotificationService messageNotificationService;
     private final IComplaintService complaintService;
     private final ISystemUserService systemUserService;
+    private final UserService userService;
     @ApiOperation("获取banner列表")
     @GetMapping("/banner-list")
     public R<List<Banner>> getBannerList() {
@@ -68,6 +70,6 @@
     @GetMapping("/current-user-info")
     @ApiOperation("获取三个身边当前用户信息 用于判断用户是否是上级")
     public R<SystemUser> getCurrentUserInfo() {
-        return R.ok(systemUserService.getSystemUserByPhone(getLoginUserInfo().getPhone()).get());
+        return R.ok(systemUserService.getSystemUserByPhone(getLoginUserInfo().getPhone()).orElse(null));
     }
 }

--
Gitblit v1.7.1