package com.dayou.configuration;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.dayou.interceptor.DefaultPageIntecptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;

/**
 * 类说明：
 *
 * @author: wucl
 * @since: 2022/11/28
 * created with IntelliJ IDEA.
 */
@Configuration
public class MybatisPlusConfig {


    @Bean
    @Order(Integer.MAX_VALUE - 1)
    public PaginationInterceptor paginationInterceptor() {
        DefaultPageIntecptor defaultPageIntecptor = new DefaultPageIntecptor();
        defaultPageIntecptor.setLimit(1000L);
        return defaultPageIntecptor;
    }


}

