mybatisPlus使用分页查询

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends ServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public IPage getUsersByPage(int pageNum, int pageSize) {
        Page page = new Page<>(pageNum, pageSize);
        return userMapper.selectPage(page, null);
    }
}

mybatisPlus使用分页查询_第1张图片

你可能感兴趣的:(#,java,java,mybatis,spring)