From 32063e565deaf03a0cc8abf1fafd146cc4e4d421 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期二, 24 二月 2026 17:41:24 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/controller/XpOperationsUserNotificationController.java | 50 ++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 44 insertions(+), 6 deletions(-)
diff --git a/xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/controller/XpOperationsUserNotificationController.java b/xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/controller/XpOperationsUserNotificationController.java
index 5806f8e..2efc1fa 100644
--- a/xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/controller/XpOperationsUserNotificationController.java
+++ b/xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/controller/XpOperationsUserNotificationController.java
@@ -1,9 +1,17 @@
package com.xiaopeng.account.controller;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
+import com.xiaopeng.account.model.query.XpOperationsUserNotificationPageQuery;
+import com.xiaopeng.account.service.IXpOperationsUserNotificationService;
+import com.xiaopeng.api.model.account.XpOperationsUserNotification;
+import com.xiaopeng.common.core.domain.R;
+import com.xiaopeng.common.core.web.page.PageInfo;
+import com.xiaopeng.common.security.service.TokenService;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
/**
* <p>
@@ -13,8 +21,38 @@
* @author mitao
* @since 2026-02-03
*/
-@Controller
-@RequestMapping("/xp-operations-user-notification")
+@Slf4j
+@RestController
public class XpOperationsUserNotificationController {
+ @Autowired
+ private IXpOperationsUserNotificationService notificationService;
+
+ @Autowired
+ private TokenService tokenService;
+
+ /**
+ * 根据当前登录用户获取通知分页列表(运维APP接口)
+ */
+ @PostMapping("/api/v1/notification/list")
+ @ApiOperation(value = "获取通知分页列表", tags = {"运维APP-消息通知"})
+ public R<PageInfo<XpOperationsUserNotification>> getNotificationList(
+ @RequestBody XpOperationsUserNotificationPageQuery query) {
+
+ log.info("查询通知分页列表, pageNum={}, pageSize={}",
+ query.getPageNum(), query.getPageSize());
+
+ // 从Token中获取当前登录用户ID
+ Long currentUserId = tokenService.getLoginOperationUser().getId();
+ query.setOperationsUserId(currentUserId);
+
+ // 查询分页列表
+ PageInfo<XpOperationsUserNotification> pageInfo =
+ notificationService.selectNotificationPageByUserId(query);
+
+ log.info("查询通知分页列表成功, userId={}, total={}",
+ currentUserId, pageInfo.getTotal());
+
+ return R.ok(pageInfo);
+ }
}
--
Gitblit v1.7.1