public interface ArticleCEIDataService extends IService<ArticleCEIData>{
}
@Service
public class ArticleCEIDataImpl extends ServiceImpl<ArticleCEIDataMapper, ArticleCEIData> implements ArticleCEIDataService {
}
@Mapper
public interface ArticleCEIDataMapper extends BaseMapper<ArticleCEIData>{
}
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.extension.plugins.PerformanceInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@Configuration
@EnableTransactionManagement
@MapperScan("com.zbjt.datahome.api.center.mapper")
public class MybatisPlusConfig {
@Bean
public PaginationInterceptor paginationInterceptor() {
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
paginationInterceptor.setLimit(5000);
return paginationInterceptor;
}
@Bean
@Profile({"dev", "test"})
public PerformanceInterceptor performanceInterceptor() {
return new PerformanceInterceptor();
}
}