From 573123827763851bba3ac301aba7515ff4ae037b Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期一, 24 二月 2025 17:42:04 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java |   73 ++++++++++++++++++++++++++++++++++++
 1 files changed, 73 insertions(+), 0 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
new file mode 100644
index 0000000..f151c92
--- /dev/null
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java
@@ -0,0 +1,73 @@
+package com.panzhihua.sangeshenbian.controller;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.panzhihua.common.controller.BaseController;
+import com.panzhihua.common.model.vos.LoginUserInfoVO;
+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.sangeshenbian.model.entity.Banner;
+import com.panzhihua.sangeshenbian.model.entity.SystemUser;
+import com.panzhihua.sangeshenbian.model.query.BasePage;
+import com.panzhihua.sangeshenbian.model.vo.ComplaintTodoVO;
+import com.panzhihua.sangeshenbian.model.vo.MessageNotificationVO;
+import com.panzhihua.sangeshenbian.model.vo.PartyCardInfoVO;
+import com.panzhihua.sangeshenbian.service.IBannerService;
+import com.panzhihua.sangeshenbian.service.IComplaintService;
+import com.panzhihua.sangeshenbian.service.IMessageNotificationService;
+import com.panzhihua.sangeshenbian.service.ISystemUserService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author mitao
+ * @date 2025/2/23
+ */
+@RestController
+@RequestMapping("/applet/home")
+@RequiredArgsConstructor
+@Api(tags = "首页相关接口")
+public class HomeController extends BaseController {
+    private final IBannerService bannerService;
+    private final IMessageNotificationService messageNotificationService;
+    private final IComplaintService complaintService;
+    private final ISystemUserService systemUserService;
+    @ApiOperation("获取banner列表")
+    @GetMapping("/banner-list")
+    public R<List<Banner>> getBannerList() {
+        return R.ok(bannerService.list());
+    }
+    @GetMapping("/party-card-info")
+    @ApiOperation("获取党员证信息")
+    public R<PartyCardInfoVO> getPartyCardInfo() {
+        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
+        PartyCardInfoVO partyCardInfoVO = new PartyCardInfoVO();
+        partyCardInfoVO.setName(loginUserInfo.getName());
+        partyCardInfoVO.setIdCard(loginUserInfo.getIdCard());
+        partyCardInfoVO.setPartyOrganization(loginUserInfo.getCommunityName());
+        return R.ok(partyCardInfoVO);
+    }
+    @PostMapping("/message")
+    @ApiOperation("获取消息列表")
+    public R<Page<MessageNotificationVO>> getMessageList(@RequestBody BasePage page) {
+        return R.ok(messageNotificationService.getMessageList(page,getUserId()));
+    }
+    @PostMapping("/todo-list")
+    @ApiOperation("获取待办诉求")
+    public R<Page<ComplaintTodoVO>> getTodoList(@RequestBody BasePage page) {
+        return R.ok(complaintService.getTodoList(page,getLoginUserInfo()));
+    }
+    @GetMapping("/current-user-info")
+    @ApiOperation("获取三个身边当前用户信息 用于判断用户是否是上级")
+    public R<SystemUser> getCurrentUserInfo() {
+        return R.ok(systemUserService.getSystemUserByPhone(getLoginUserInfo().getPhone()).get());
+    }
+}

--
Gitblit v1.7.1