From 368beb362d7ffb017174d7d79a16032d0647776f Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期一, 26 八月 2024 13:48:11 +0800
Subject: [PATCH] model

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/common/config/MybatisPlusConfig.java |   78 +++++++++++++++++---------------------
 1 files changed, 35 insertions(+), 43 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/common/config/MybatisPlusConfig.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/common/config/MybatisPlusConfig.java
index a9ef27e..8a07c72 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/common/config/MybatisPlusConfig.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/common/config/MybatisPlusConfig.java
@@ -1,43 +1,35 @@
-///**
-// * Copyright (c) 2018 人人开源 All rights reserved.
-// *
-// * https://www.renren.io
-// *
-// * 版权所有,侵权必究!
-// */
-//
-//package com.iailab.common.config;
-//
-//import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
-//import com.baomidou.mybatisplus.extension.plugins.inner.BlockAttackInnerInterceptor;
-//import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
-//import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
-//import com.iailab.common.interceptor.DataFilterInterceptor;
-//import org.springframework.context.annotation.Bean;
-//import org.springframework.context.annotation.Configuration;
-//
-///**
-// * mybatis-plus配置
-// *
-// * @author Mark sunlightcs@gmail.com
-// * @since 1.0.0
-// */
-//@Configuration
-//public class MybatisPlusConfig {
-//
-//    @Bean
-//    public MybatisPlusInterceptor mybatisPlusInterceptor() {
-//        MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
-//        // 数据权限
-//        mybatisPlusInterceptor.addInnerInterceptor(new DataFilterInterceptor());
-//        // 分页插件
-//        mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor());
-//        // 乐观锁
-//        mybatisPlusInterceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
-//        // 防止全表更新与删除
-//        mybatisPlusInterceptor.addInnerInterceptor(new BlockAttackInnerInterceptor());
-//
-//        return mybatisPlusInterceptor;
-//    }
-//
-//}
\ No newline at end of file
+package com.iailab.common.config;
+
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.BlockAttackInnerInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import com.iailab.framework.mybatis.interceptor.DataFilterInterceptor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * mybatis-plus配置
+ *
+ * @author Mark sunlightcs@gmail.com
+ * @since 1.0.0
+ */
+@Configuration
+public class MybatisPlusConfig {
+
+    @Bean
+    public MybatisPlusInterceptor mybatisPlusInterceptor() {
+        MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
+        // 数据权限
+        mybatisPlusInterceptor.addInnerInterceptor(new DataFilterInterceptor());
+        // 分页插件
+        mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor());
+        // 乐观锁
+        mybatisPlusInterceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
+        // 防止全表更新与删除
+        mybatisPlusInterceptor.addInnerInterceptor(new BlockAttackInnerInterceptor());
+
+        return mybatisPlusInterceptor;
+    }
+
+}
\ No newline at end of file

--
Gitblit v1.9.3