From 5e9d6b754b36872795f8900e5cf4b740f3bbd890 Mon Sep 17 00:00:00 2001
From: yulichang <570810310@qq.com>
Date: Mon, 28 Nov 2022 09:40:45 +0800
Subject: [PATCH] test
---
mybatis-plus-join-test/pom.xml | 16 +++++++-----
.../test/resources/application-collection.yml | 5 ----
.../src/test/resources/application-join.yml | 5 ----
.../test/resources/application-mapping.yml | 5 ----
.../test-collection/pom.xml | 20 ++++++++++++++
.../test/collection/Application.java | 5 ++++
.../collection/config/MybatisPlusConfig.java | 0
.../test/collection/dto/TableADTO.java | 0
.../test/collection/dto/TableBDTO.java | 0
.../test/collection/dto/TableCDTO.java | 0
.../test/collection/dto/TableDDTO.java | 0
.../test/collection/dto/TableEDTO.java | 0
.../test/collection/entity/TableA.java | 0
.../test/collection/entity/TableB.java | 0
.../test/collection/entity/TableC.java | 0
.../test/collection/entity/TableD.java | 0
.../test/collection/entity/TableE.java | 0
.../yulichang/test/collection/enums/Sex.java | 0
.../test/collection/mapper/TableAMapper.java | 0
.../test/collection/mapper/TableBMapper.java | 0
.../test/collection/mapper/TableCMapper.java | 0
.../test/collection/mapper/TableDMapper.java | 0
.../test/collection/mapper/TableEMapper.java | 0
.../src/main}/resources/application.yml | 4 +++
.../src/main/resources/db}/data.sql | 0
.../src/main/resources/db}/schema.sql | 0
.../test/collection/CollectionTest.java | 3 +--
mybatis-plus-join-test/test-join/pom.xml | 19 ++++++++++++++
.../yulichang/test/join/Application.java | 5 ++++
.../test/join/config/MybatisPlusConfig.java | 0
.../yulichang/test/join/dto/AddressDTO.java | 0
.../yulichang/test/join/dto/AreaDTO.java | 0
.../yulichang/test/join/dto/TableDTO.java | 0
.../yulichang/test/join/dto/UserDTO.java | 0
.../yulichang/test/join/entity/AddressDO.java | 0
.../yulichang/test/join/entity/AreaDO.java | 0
.../yulichang/test/join/entity/UserDO.java | 0
.../github/yulichang/test/join/enums/Sex.java | 0
.../test/join/mapper/AddressMapper.java | 0
.../test/join/mapper/AreaMapper.java | 0
.../test/join/mapper/UserMapper.java | 0
.../src/main/resources/application.yml | 26 +++++++++++++++++++
.../src/main/resources/db}/data.sql | 0
.../src/main/resources/db}/schema.sql | 0
.../test/join/LambdaWrapperTest.java | 25 +++++-------------
.../yulichang/test/join/QueryWrapperTest.java | 2 +-
mybatis-plus-join-test/test-mapping/pom.xml | 20 ++++++++++++++
.../yulichang/test/mapping/Application.java | 0
.../mapping/config/MybatisPlusConfig.java | 0
.../test/mapping/entity/AddressDO.java | 0
.../yulichang/test/mapping/entity/AreaDO.java | 0
.../yulichang/test/mapping/entity/UserDO.java | 0
.../yulichang/test/mapping/enums/Sex.java | 0
.../test/mapping/mapper/AddressMapper.java | 0
.../test/mapping/mapper/AreaMapper.java | 0
.../test/mapping/mapper/UserMapper.java | 0
.../src/main/resources/application.yml | 26 +++++++++++++++++++
.../src/main/resources/db}/data.sql | 0
.../src/main/resources/db}/schema.sql | 0
.../yulichang/test/mapping/MappingTest.java | 2 +-
60 files changed, 145 insertions(+), 43 deletions(-)
delete mode 100644 mybatis-plus-join-test/src/test/resources/application-collection.yml
delete mode 100644 mybatis-plus-join-test/src/test/resources/application-join.yml
delete mode 100644 mybatis-plus-join-test/src/test/resources/application-mapping.yml
create mode 100644 mybatis-plus-join-test/test-collection/pom.xml
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/Application.java (51%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/config/MybatisPlusConfig.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/dto/TableADTO.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/dto/TableBDTO.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/dto/TableCDTO.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/dto/TableDDTO.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/dto/TableEDTO.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/entity/TableA.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/entity/TableB.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/entity/TableC.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/entity/TableD.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/entity/TableE.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/enums/Sex.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/mapper/TableAMapper.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/mapper/TableBMapper.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/mapper/TableCMapper.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/mapper/TableDMapper.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/java/com/github/yulichang/test/collection/mapper/TableEMapper.java (100%)
rename mybatis-plus-join-test/{src/test => test-collection/src/main}/resources/application.yml (82%)
rename mybatis-plus-join-test/{src/test/resources/db/collection => test-collection/src/main/resources/db}/data.sql (100%)
rename mybatis-plus-join-test/{src/test/resources/db/collection => test-collection/src/main/resources/db}/schema.sql (100%)
rename mybatis-plus-join-test/{ => test-collection}/src/test/java/com/github/yulichang/test/collection/CollectionTest.java (95%)
create mode 100644 mybatis-plus-join-test/test-join/pom.xml
rename mybatis-plus-join-test/{src/test => test-join/src/main}/java/com/github/yulichang/test/join/Application.java (50%)
rename mybatis-plus-join-test/{src/test => test-join/src/main}/java/com/github/yulichang/test/join/config/MybatisPlusConfig.java (100%)
rename mybatis-plus-join-test/{src/test => test-join/src/main}/java/com/github/yulichang/test/join/dto/AddressDTO.java (100%)
rename mybatis-plus-join-test/{src/test => test-join/src/main}/java/com/github/yulichang/test/join/dto/AreaDTO.java (100%)
rename mybatis-plus-join-test/{src/test => test-join/src/main}/java/com/github/yulichang/test/join/dto/TableDTO.java (100%)
rename mybatis-plus-join-test/{src/test => test-join/src/main}/java/com/github/yulichang/test/join/dto/UserDTO.java (100%)
rename mybatis-plus-join-test/{src/test => test-join/src/main}/java/com/github/yulichang/test/join/entity/AddressDO.java (100%)
rename mybatis-plus-join-test/{src/test => test-join/src/main}/java/com/github/yulichang/test/join/entity/AreaDO.java (100%)
rename mybatis-plus-join-test/{src/test => test-join/src/main}/java/com/github/yulichang/test/join/entity/UserDO.java (100%)
rename mybatis-plus-join-test/{src/test => test-join/src/main}/java/com/github/yulichang/test/join/enums/Sex.java (100%)
rename mybatis-plus-join-test/{src/test => test-join/src/main}/java/com/github/yulichang/test/join/mapper/AddressMapper.java (100%)
rename mybatis-plus-join-test/{src/test => test-join/src/main}/java/com/github/yulichang/test/join/mapper/AreaMapper.java (100%)
rename mybatis-plus-join-test/{src/test => test-join/src/main}/java/com/github/yulichang/test/join/mapper/UserMapper.java (100%)
create mode 100644 mybatis-plus-join-test/test-join/src/main/resources/application.yml
rename mybatis-plus-join-test/{src/test/resources/db/join => test-join/src/main/resources/db}/data.sql (100%)
rename mybatis-plus-join-test/{src/test/resources/db/join => test-join/src/main/resources/db}/schema.sql (100%)
rename mybatis-plus-join-test/{ => test-join}/src/test/java/com/github/yulichang/test/join/LambdaWrapperTest.java (86%)
rename mybatis-plus-join-test/{ => test-join}/src/test/java/com/github/yulichang/test/join/QueryWrapperTest.java (98%)
create mode 100644 mybatis-plus-join-test/test-mapping/pom.xml
rename mybatis-plus-join-test/{src/test => test-mapping/src/main}/java/com/github/yulichang/test/mapping/Application.java (100%)
rename mybatis-plus-join-test/{src/test => test-mapping/src/main}/java/com/github/yulichang/test/mapping/config/MybatisPlusConfig.java (100%)
rename mybatis-plus-join-test/{src/test => test-mapping/src/main}/java/com/github/yulichang/test/mapping/entity/AddressDO.java (100%)
rename mybatis-plus-join-test/{src/test => test-mapping/src/main}/java/com/github/yulichang/test/mapping/entity/AreaDO.java (100%)
rename mybatis-plus-join-test/{src/test => test-mapping/src/main}/java/com/github/yulichang/test/mapping/entity/UserDO.java (100%)
rename mybatis-plus-join-test/{src/test => test-mapping/src/main}/java/com/github/yulichang/test/mapping/enums/Sex.java (100%)
rename mybatis-plus-join-test/{src/test => test-mapping/src/main}/java/com/github/yulichang/test/mapping/mapper/AddressMapper.java (100%)
rename mybatis-plus-join-test/{src/test => test-mapping/src/main}/java/com/github/yulichang/test/mapping/mapper/AreaMapper.java (100%)
rename mybatis-plus-join-test/{src/test => test-mapping/src/main}/java/com/github/yulichang/test/mapping/mapper/UserMapper.java (100%)
create mode 100644 mybatis-plus-join-test/test-mapping/src/main/resources/application.yml
rename mybatis-plus-join-test/{src/test/resources/db/mapping => test-mapping/src/main/resources/db}/data.sql (100%)
rename mybatis-plus-join-test/{src/test/resources/db/mapping => test-mapping/src/main/resources/db}/schema.sql (100%)
rename mybatis-plus-join-test/{ => test-mapping}/src/test/java/com/github/yulichang/test/mapping/MappingTest.java (91%)
diff --git a/mybatis-plus-join-test/pom.xml b/mybatis-plus-join-test/pom.xml
index 53dec2d..7cad6b9 100644
--- a/mybatis-plus-join-test/pom.xml
+++ b/mybatis-plus-join-test/pom.xml
@@ -4,15 +4,19 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
-
- com.github.yulichang
- mybatis-plus-join-root
- 1.3.8
-
- 1.3.8
+ com.github.yulichang
mybatis-plus-join-test
+ pom
+ 1.3.8
+
mybatis-plus-join-test
+
+ test-join
+ test-collection
+ test-mapping
+
+
An enhanced toolkit of Mybatis-Plus to simplify development.
https://github.com/yulichang/mybatis-plus-join
diff --git a/mybatis-plus-join-test/src/test/resources/application-collection.yml b/mybatis-plus-join-test/src/test/resources/application-collection.yml
deleted file mode 100644
index 00f280f..0000000
--- a/mybatis-plus-join-test/src/test/resources/application-collection.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-spring:
- sql:
- init:
- schema-locations: classpath:db/collection/schema.sql
- data-locations: classpath:db/collection/data.sql
\ No newline at end of file
diff --git a/mybatis-plus-join-test/src/test/resources/application-join.yml b/mybatis-plus-join-test/src/test/resources/application-join.yml
deleted file mode 100644
index 5f17720..0000000
--- a/mybatis-plus-join-test/src/test/resources/application-join.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-spring:
- sql:
- init:
- schema-locations: classpath:db/join/schema.sql
- data-locations: classpath:db/join/data.sql
\ No newline at end of file
diff --git a/mybatis-plus-join-test/src/test/resources/application-mapping.yml b/mybatis-plus-join-test/src/test/resources/application-mapping.yml
deleted file mode 100644
index 083aef4..0000000
--- a/mybatis-plus-join-test/src/test/resources/application-mapping.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-spring:
- sql:
- init:
- schema-locations: classpath:db/mapping/schema.sql
- data-locations: classpath:db/mapping/data.sql
\ No newline at end of file
diff --git a/mybatis-plus-join-test/test-collection/pom.xml b/mybatis-plus-join-test/test-collection/pom.xml
new file mode 100644
index 0000000..362db34
--- /dev/null
+++ b/mybatis-plus-join-test/test-collection/pom.xml
@@ -0,0 +1,20 @@
+
+
+
+ com.github.yulichang
+ mybatis-plus-join-test
+ 1.3.8
+
+ 4.0.0
+
+ test-collection
+
+
+ 8
+ 8
+ UTF-8
+
+
+
\ No newline at end of file
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/Application.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/Application.java
similarity index 51%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/Application.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/Application.java
index b8b9aee..f45538c 100644
--- a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/Application.java
+++ b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/Application.java
@@ -1,9 +1,14 @@
package com.github.yulichang.test.collection;
+import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+
}
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/config/MybatisPlusConfig.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/config/MybatisPlusConfig.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/config/MybatisPlusConfig.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/config/MybatisPlusConfig.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/dto/TableADTO.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/dto/TableADTO.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/dto/TableADTO.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/dto/TableADTO.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/dto/TableBDTO.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/dto/TableBDTO.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/dto/TableBDTO.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/dto/TableBDTO.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/dto/TableCDTO.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/dto/TableCDTO.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/dto/TableCDTO.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/dto/TableCDTO.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/dto/TableDDTO.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/dto/TableDDTO.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/dto/TableDDTO.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/dto/TableDDTO.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/dto/TableEDTO.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/dto/TableEDTO.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/dto/TableEDTO.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/dto/TableEDTO.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/entity/TableA.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/entity/TableA.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/entity/TableA.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/entity/TableA.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/entity/TableB.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/entity/TableB.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/entity/TableB.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/entity/TableB.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/entity/TableC.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/entity/TableC.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/entity/TableC.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/entity/TableC.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/entity/TableD.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/entity/TableD.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/entity/TableD.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/entity/TableD.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/entity/TableE.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/entity/TableE.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/entity/TableE.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/entity/TableE.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/enums/Sex.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/enums/Sex.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/enums/Sex.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/enums/Sex.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/mapper/TableAMapper.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/mapper/TableAMapper.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/mapper/TableAMapper.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/mapper/TableAMapper.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/mapper/TableBMapper.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/mapper/TableBMapper.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/mapper/TableBMapper.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/mapper/TableBMapper.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/mapper/TableCMapper.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/mapper/TableCMapper.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/mapper/TableCMapper.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/mapper/TableCMapper.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/mapper/TableDMapper.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/mapper/TableDMapper.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/mapper/TableDMapper.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/mapper/TableDMapper.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/mapper/TableEMapper.java b/mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/mapper/TableEMapper.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/mapper/TableEMapper.java
rename to mybatis-plus-join-test/test-collection/src/main/java/com/github/yulichang/test/collection/mapper/TableEMapper.java
diff --git a/mybatis-plus-join-test/src/test/resources/application.yml b/mybatis-plus-join-test/test-collection/src/main/resources/application.yml
similarity index 82%
rename from mybatis-plus-join-test/src/test/resources/application.yml
rename to mybatis-plus-join-test/test-collection/src/main/resources/application.yml
index 21a04ba..a60d6c4 100644
--- a/mybatis-plus-join-test/src/test/resources/application.yml
+++ b/mybatis-plus-join-test/test-collection/src/main/resources/application.yml
@@ -1,4 +1,8 @@
spring:
+ sql:
+ init:
+ schema-locations: classpath:db/schema.sql
+ data-locations: classpath:db/data.sql
datasource:
driver-class-name: org.h2.Driver
url: jdbc:h2:mem:test
diff --git a/mybatis-plus-join-test/src/test/resources/db/collection/data.sql b/mybatis-plus-join-test/test-collection/src/main/resources/db/data.sql
similarity index 100%
rename from mybatis-plus-join-test/src/test/resources/db/collection/data.sql
rename to mybatis-plus-join-test/test-collection/src/main/resources/db/data.sql
diff --git a/mybatis-plus-join-test/src/test/resources/db/collection/schema.sql b/mybatis-plus-join-test/test-collection/src/main/resources/db/schema.sql
similarity index 100%
rename from mybatis-plus-join-test/src/test/resources/db/collection/schema.sql
rename to mybatis-plus-join-test/test-collection/src/main/resources/db/schema.sql
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/CollectionTest.java b/mybatis-plus-join-test/test-collection/src/test/java/com/github/yulichang/test/collection/CollectionTest.java
similarity index 95%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/CollectionTest.java
rename to mybatis-plus-join-test/test-collection/src/test/java/com/github/yulichang/test/collection/CollectionTest.java
index 1c16508..b44cb77 100644
--- a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/collection/CollectionTest.java
+++ b/mybatis-plus-join-test/test-collection/src/test/java/com/github/yulichang/test/collection/CollectionTest.java
@@ -22,7 +22,7 @@ import java.util.List;
* 移除了mybatis-plus 逻辑删除支持,逻辑删除需要在连表查询时自己添加对应的条件
*/
@SuppressWarnings("unused")
-@SpringBootTest(properties = "spring.profiles.active=collection")
+@SpringBootTest
class CollectionTest {
@Resource
private TableAMapper tableAMapper;
@@ -42,7 +42,6 @@ class CollectionTest {
.leftJoin(TableE.class, TableE::getDid, TableD::getId);
List dtos = tableAMapper.selectJoinList(TableADTO.class, wrapper);
- assert dtos.size() == 1;
System.out.println(dtos);
}
}
diff --git a/mybatis-plus-join-test/test-join/pom.xml b/mybatis-plus-join-test/test-join/pom.xml
new file mode 100644
index 0000000..b11b489
--- /dev/null
+++ b/mybatis-plus-join-test/test-join/pom.xml
@@ -0,0 +1,19 @@
+
+
+
+ com.github.yulichang
+ mybatis-plus-join-test
+ 1.3.8
+
+ 4.0.0
+
+ test-join
+
+
+ 8
+ 8
+ UTF-8
+
+
\ No newline at end of file
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/Application.java b/mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/Application.java
similarity index 50%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/Application.java
rename to mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/Application.java
index 84473d9..ec86d93 100644
--- a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/Application.java
+++ b/mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/Application.java
@@ -1,9 +1,14 @@
package com.github.yulichang.test.join;
+import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+
}
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/config/MybatisPlusConfig.java b/mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/config/MybatisPlusConfig.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/config/MybatisPlusConfig.java
rename to mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/config/MybatisPlusConfig.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/dto/AddressDTO.java b/mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/dto/AddressDTO.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/dto/AddressDTO.java
rename to mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/dto/AddressDTO.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/dto/AreaDTO.java b/mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/dto/AreaDTO.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/dto/AreaDTO.java
rename to mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/dto/AreaDTO.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/dto/TableDTO.java b/mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/dto/TableDTO.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/dto/TableDTO.java
rename to mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/dto/TableDTO.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/dto/UserDTO.java b/mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/dto/UserDTO.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/dto/UserDTO.java
rename to mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/dto/UserDTO.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/entity/AddressDO.java b/mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/entity/AddressDO.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/entity/AddressDO.java
rename to mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/entity/AddressDO.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/entity/AreaDO.java b/mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/entity/AreaDO.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/entity/AreaDO.java
rename to mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/entity/AreaDO.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/entity/UserDO.java b/mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/entity/UserDO.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/entity/UserDO.java
rename to mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/entity/UserDO.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/enums/Sex.java b/mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/enums/Sex.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/enums/Sex.java
rename to mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/enums/Sex.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/mapper/AddressMapper.java b/mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/mapper/AddressMapper.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/mapper/AddressMapper.java
rename to mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/mapper/AddressMapper.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/mapper/AreaMapper.java b/mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/mapper/AreaMapper.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/mapper/AreaMapper.java
rename to mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/mapper/AreaMapper.java
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/mapper/UserMapper.java b/mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/mapper/UserMapper.java
similarity index 100%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/mapper/UserMapper.java
rename to mybatis-plus-join-test/test-join/src/main/java/com/github/yulichang/test/join/mapper/UserMapper.java
diff --git a/mybatis-plus-join-test/test-join/src/main/resources/application.yml b/mybatis-plus-join-test/test-join/src/main/resources/application.yml
new file mode 100644
index 0000000..aeda078
--- /dev/null
+++ b/mybatis-plus-join-test/test-join/src/main/resources/application.yml
@@ -0,0 +1,26 @@
+spring:
+ datasource:
+ driver-class-name: org.h2.Driver
+ url: jdbc:h2:mem:test
+ username: root
+ password: test
+ sql:
+ init:
+ schema-locations: classpath:db/schema.sql
+ data-locations: classpath:db/data.sql
+
+mybatis-plus:
+ typeEnumsPackage: com.github.yulichang.test
+ global-config:
+ db-config:
+ logic-delete-field: del
+ logic-delete-value: true
+ logic-not-delete-value: false
+ banner: true
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+# 打印 mybatis plus join banner
+mybatis-plus-join:
+ banner: true
+ sub-table-logic: true
\ No newline at end of file
diff --git a/mybatis-plus-join-test/src/test/resources/db/join/data.sql b/mybatis-plus-join-test/test-join/src/main/resources/db/data.sql
similarity index 100%
rename from mybatis-plus-join-test/src/test/resources/db/join/data.sql
rename to mybatis-plus-join-test/test-join/src/main/resources/db/data.sql
diff --git a/mybatis-plus-join-test/src/test/resources/db/join/schema.sql b/mybatis-plus-join-test/test-join/src/main/resources/db/schema.sql
similarity index 100%
rename from mybatis-plus-join-test/src/test/resources/db/join/schema.sql
rename to mybatis-plus-join-test/test-join/src/main/resources/db/schema.sql
diff --git a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/LambdaWrapperTest.java b/mybatis-plus-join-test/test-join/src/test/java/com/github/yulichang/test/join/LambdaWrapperTest.java
similarity index 86%
rename from mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/LambdaWrapperTest.java
rename to mybatis-plus-join-test/test-join/src/test/java/com/github/yulichang/test/join/LambdaWrapperTest.java
index 847869b..6b46a95 100644
--- a/mybatis-plus-join-test/src/test/java/com/github/yulichang/test/join/LambdaWrapperTest.java
+++ b/mybatis-plus-join-test/test-join/src/test/java/com/github/yulichang/test/join/LambdaWrapperTest.java
@@ -27,7 +27,7 @@ import java.util.Map;
* 移除了mybatis-plus 逻辑删除支持,逻辑删除需要在连表查询时自己添加对应的条件
*/
@SuppressWarnings("unused")
-@SpringBootTest(properties = "spring.profiles.active=join")
+@SpringBootTest
class LambdaWrapperTest {
@Resource
private UserMapper userMapper;
@@ -40,14 +40,8 @@ class LambdaWrapperTest {
.association(AreaDO.class, AddressDTO::getArea))
.leftJoin(AddressDO.class, AddressDO::getUserId, UserDO::getId)
.leftJoin(AreaDO.class, AreaDO::getId, AddressDO::getAreaId)
- .orderByDesc(UserDO::getId)
- .last("unfdjknsnnjkfd");
+ .orderByDesc(UserDO::getId);
List list = userMapper.selectJoinList(UserDTO.class, wrapper);
- String s = wrapper.getSqlSegment();
- System.out.println(s);
- if (list.size() != 1) {
- throw new RuntimeException();
- }
list.forEach(System.out::println);
}
@@ -63,8 +57,7 @@ class LambdaWrapperTest {
.select(AddressDO::getAddress)
.select(AreaDO::getProvince)
.leftJoin(AddressDO.class, AddressDO::getUserId, UserDO::getId)
- .leftJoin(AreaDO.class, AreaDO::getId, AddressDO::getAreaId)
- .last("unfdjknsnnjkfd"));
+ .leftJoin(AreaDO.class, AreaDO::getId, AddressDO::getAreaId));
iPage.getRecords().forEach(System.out::println);
}
@@ -85,8 +78,7 @@ class LambdaWrapperTest {
.and(i -> i.eq(UserDO::getHeadImg, "er")
.or()
.eq(AddressDO::getUserId, 1))
- .eq(UserDO::getId, 1)
- .last("ljfnkegrwbgejkwbenf"));
+ .eq(UserDO::getId, 1));
page.getRecords().forEach(System.out::println);
}
@@ -98,8 +90,7 @@ class LambdaWrapperTest {
UserDTO one = userMapper.selectJoinOne(UserDTO.class, MPJWrappers.lambdaJoin()
.selectSum(UserDO::getId)
.selectMax(UserDO::getId, UserDTO::getHeadImg)
- .leftJoin(AddressDO.class, AddressDO::getUserId, UserDO::getId)
- .last("unfdjknsnnjkfd"));
+ .leftJoin(AddressDO.class, AddressDO::getUserId, UserDO::getId));
System.out.println(one);
}
@@ -116,8 +107,7 @@ class LambdaWrapperTest {
.select(AddressDO.class, p -> true)
.select(AddressDO::getAddress)
.leftJoin(AddressDO.class, AddressDO::getUserId, UserDO::getId)
- .eq(UserDO::getId, 1)
- .last("unfdjknsnnjkfd"));
+ .eq(UserDO::getId, 1));
page.getRecords().forEach(System.out::println);
}
@@ -130,8 +120,7 @@ class LambdaWrapperTest {
List