From c45af2c29cbaa44e10de87d8505e789a6864ce78 Mon Sep 17 00:00:00 2001 From: lbw Date: Mon, 5 Jun 2023 16:20:09 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20Introducing=20new=20features.=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20mybatis-plus=20=E8=BF=9E=E8=A1=A8=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pigx-common/pigx-common-bom/pom.xml | 13 +++ pigx-common/pigx-common-data/pom.xml | 93 ++++++++++--------- .../data/datascope/DataScopeSqlInjector.java | 3 +- .../common/data/datascope/PigxBaseMapper.java | 3 +- .../mybatis/MybatisPlusConfiguration.java | 2 + pigx-upms/pigx-upms-api/pom.xml | 79 ++++++++-------- 6 files changed, 110 insertions(+), 83 deletions(-) diff --git a/pigx-common/pigx-common-bom/pom.xml b/pigx-common/pigx-common-bom/pom.xml index 5e4dd782e..c318a5728 100644 --- a/pigx-common/pigx-common-bom/pom.xml +++ b/pigx-common/pigx-common-bom/pom.xml @@ -19,6 +19,7 @@ 5.0.0 3.5.3.1 + 1.4.5 3.5.2 1.2.9 5.8.16 @@ -191,6 +192,18 @@ dynamic-datasource-spring-boot-starter ${dynamic-ds.version} + + + com.github.yulichang + mybatis-plus-join-boot-starter + ${mybatis-plus-join.version} + + + + com.github.yulichang + mybatis-plus-join-annotation + ${mybatis-plus-join.version} + com.alibaba diff --git a/pigx-common/pigx-common-data/pom.xml b/pigx-common/pigx-common-data/pom.xml index 0ebadaad7..2d180b781 100644 --- a/pigx-common/pigx-common-data/pom.xml +++ b/pigx-common/pigx-common-data/pom.xml @@ -19,52 +19,57 @@ --> - 4.0.0 - - com.pig4cloud - pigx-common - 5.0.0 - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + + com.pig4cloud + pigx-common + 5.0.0 + - pigx-common-data - jar + pigx-common-data + jar - pigx 数据操作相关 + pigx 数据操作相关 - - - - com.pig4cloud - pigx-common-core - - - - com.baomidou - mybatis-plus-extension - - - - com.alibaba - druid - true - - - - com.pig4cloud - pigx-common-security - true - - - - com.pig4cloud - pigx-upms-api - - - - org.springframework.boot - spring-boot-starter-data-redis - - + + + + com.pig4cloud + pigx-common-core + + + + com.baomidou + mybatis-plus-extension + + + + com.github.yulichang + mybatis-plus-join-boot-starter + + + + com.alibaba + druid + true + + + + com.pig4cloud + pigx-common-security + true + + + + com.pig4cloud + pigx-upms-api + + + + org.springframework.boot + spring-boot-starter-data-redis + + diff --git a/pigx-common/pigx-common-data/src/main/java/com/pig4cloud/pigx/common/data/datascope/DataScopeSqlInjector.java b/pigx-common/pigx-common-data/src/main/java/com/pig4cloud/pigx/common/data/datascope/DataScopeSqlInjector.java index c4c2eeb8f..656cd723f 100644 --- a/pigx-common/pigx-common-data/src/main/java/com/pig4cloud/pigx/common/data/datascope/DataScopeSqlInjector.java +++ b/pigx-common/pigx-common-data/src/main/java/com/pig4cloud/pigx/common/data/datascope/DataScopeSqlInjector.java @@ -3,6 +3,7 @@ package com.pig4cloud.pigx.common.data.datascope; import com.baomidou.mybatisplus.core.injector.AbstractMethod; import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector; import com.baomidou.mybatisplus.core.metadata.TableInfo; +import com.github.yulichang.injector.MPJSqlInjector; import java.util.List; @@ -12,7 +13,7 @@ import java.util.List; * @author lengleng * @date 2020-06-17 */ -public class DataScopeSqlInjector extends DefaultSqlInjector { +public class DataScopeSqlInjector extends MPJSqlInjector { @Override public List getMethodList(Class mapperClass, TableInfo tableInfo) { diff --git a/pigx-common/pigx-common-data/src/main/java/com/pig4cloud/pigx/common/data/datascope/PigxBaseMapper.java b/pigx-common/pigx-common-data/src/main/java/com/pig4cloud/pigx/common/data/datascope/PigxBaseMapper.java index 6db484e14..110064a6f 100644 --- a/pigx-common/pigx-common-data/src/main/java/com/pig4cloud/pigx/common/data/datascope/PigxBaseMapper.java +++ b/pigx-common/pigx-common-data/src/main/java/com/pig4cloud/pigx/common/data/datascope/PigxBaseMapper.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.github.yulichang.base.MPJBaseMapper; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -14,7 +15,7 @@ import java.util.List; * @author lengleng * @date 2020-06-17 */ -public interface PigxBaseMapper extends BaseMapper { +public interface PigxBaseMapper extends MPJBaseMapper { /** * 根据 entity 条件,查询全部记录 diff --git a/pigx-common/pigx-common-data/src/main/java/com/pig4cloud/pigx/common/data/mybatis/MybatisPlusConfiguration.java b/pigx-common/pigx-common-data/src/main/java/com/pig4cloud/pigx/common/data/mybatis/MybatisPlusConfiguration.java index 6068b1250..b3099e5e6 100644 --- a/pigx-common/pigx-common-data/src/main/java/com/pig4cloud/pigx/common/data/mybatis/MybatisPlusConfiguration.java +++ b/pigx-common/pigx-common-data/src/main/java/com/pig4cloud/pigx/common/data/mybatis/MybatisPlusConfiguration.java @@ -41,6 +41,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @@ -116,6 +117,7 @@ public class MybatisPlusConfiguration implements WebMvcConfigurer { * @return */ @Bean + @Primary @ConditionalOnBean(DataScopeInterceptor.class) public DataScopeSqlInjector dataScopeSqlInjector() { return new DataScopeSqlInjector(); diff --git a/pigx-upms/pigx-upms-api/pom.xml b/pigx-upms/pigx-upms-api/pom.xml index 4712855c3..0fce1fbe4 100644 --- a/pigx-upms/pigx-upms-api/pom.xml +++ b/pigx-upms/pigx-upms-api/pom.xml @@ -19,45 +19,50 @@ --> - 4.0.0 - - com.pig4cloud - pigx-upms - 5.0.0 - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + + com.pig4cloud + pigx-upms + 5.0.0 + - pigx-upms-api - jar + pigx-upms-api + jar - pigx 通用用户权限管理系统公共api模块 + pigx 通用用户权限管理系统公共api模块 - - - - com.pig4cloud - pigx-common-core - - - - com.baomidou - mybatis-plus-extension - - - - com.pig4cloud - pigx-common-feign - - - - com.pig4cloud - pigx-common-excel - - - - org.javers - javers-core - - + + + + com.github.yulichang + mybatis-plus-join-annotation + + + + com.pig4cloud + pigx-common-core + + + + com.baomidou + mybatis-plus-extension + + + + com.pig4cloud + pigx-common-feign + + + + com.pig4cloud + pigx-common-excel + + + + org.javers + javers-core + +