无关风月
2026-02-24 32063e565deaf03a0cc8abf1fafd146cc4e4d421
xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpOperationsUserNotificationServiceImpl.java
@@ -1,9 +1,12 @@
package com.xiaopeng.account.service.impl;
import com.xiaopeng.account.mapper.XpOperationsUserNotificationMapper;
import com.xiaopeng.account.service.IXpOperationsUserNotificationService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiaopeng.account.mapper.XpOperationsUserNotificationMapper;
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.web.page.PageInfo;
import org.springframework.stereotype.Service;
/**
@@ -17,4 +20,27 @@
@Service
public class XpOperationsUserNotificationServiceImpl extends ServiceImpl<XpOperationsUserNotificationMapper, XpOperationsUserNotification> implements IXpOperationsUserNotificationService {
    @Override
    public PageInfo<XpOperationsUserNotification> selectNotificationPageByUserId(
            XpOperationsUserNotificationPageQuery query) {
        // 创建分页对象
        Page<XpOperationsUserNotification> page = new Page<>(
            query.getPageNum(),
            query.getPageSize()
        );
        // 执行分页查询
        Page<XpOperationsUserNotification> resultPage = baseMapper.selectNotificationPageByUserId(
            page,
            query
        );
        // 封装分页结果
        PageInfo<XpOperationsUserNotification> pageInfo = new PageInfo<>();
        pageInfo.setRecords(resultPage.getRecords());
        pageInfo.setTotal(resultPage.getTotal());
        return pageInfo;
    }
}