seatonwan9
2025-08-19 84c6e1df4b6bd48ee0517a33778b514008022875
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.webmanage.service.impl;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.webmanage.common.PageResult;
import com.webmanage.dto.PointsMainQueryDTO;
import com.webmanage.entity.Points;
import com.webmanage.mapper.PointsMapper;
import com.webmanage.service.PointsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
 
/**
 * 积分主表Service实现类
 */
@Slf4j
@Service
public class PointsServiceImpl extends ServiceImpl<PointsMapper, Points> implements PointsService {
    
    @Override
    public PageResult<Points> getPointsMainPage(PointsMainQueryDTO queryDTO) {
        // 创建分页对象
        Page<Points> page = new Page<>(queryDTO.getPageNum(), queryDTO.getPageSize());
        
        // 执行分页查询
        IPage<Points> result = baseMapper.selectPointsMainPage(page, queryDTO);
        
        // 构建返回结果
        return new PageResult<Points>(
            result.getRecords(),
            result.getTotal(),
            queryDTO.getPageNum().longValue(),
            queryDTO.getPageSize().longValue(),
            result.getPages()
        );
    }
}