package com.yeejoin.amos.boot.module.tzs.biz.config;

import com.baomidou.mybatisplus.annotation.DbType;
import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder;
import freemarker.template.utility.ObjectFactory;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.cloud.openfeign.support.SpringEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;

@Configuration(value="MybatisPlusConfig")
public class MybatisPlusConfig {

	@Bean
	public  PaginationInterceptor paginationInterceptor() 
	{
		PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
		paginationInterceptor.setLimit(50000);
		paginationInterceptor.setDialectType(DbType.POSTGRE_SQL.getDb());
		return paginationInterceptor;
	}

//	@Bean
//	public MybatisPlusInterceptor mybatisPlusInterceptor() {
//		MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
//		interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.H2));
//		return interceptor;
//	}
}
