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

import com.baomidou.mybatisplus.annotation.DbType;
import com.yeejoin.amos.boot.module.jg.biz.utils.SqlInjectorUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Primary;

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

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

	@Bean
	public SqlInjectorUtils sqlInjectorUtils() {
		return new SqlInjectorUtils();
	}
}
