mirror of
https://gitee.com/best_handsome/mybatis-plus-join
synced 2025-07-11 00:02:22 +08:00
1.2.1
This commit is contained in:
parent
5438af5e5c
commit
39faebe0ce
11
MAPPING.md
11
MAPPING.md
@ -29,6 +29,17 @@ public class UserDO {
|
||||
@EntityMapping(thisField = "id", joinField = "pid")
|
||||
private List<UserDO> childUser;
|
||||
|
||||
/**
|
||||
* 带条件的查询下级 一对多
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@EntityMapping(thisField = "id", joinField = "pid",
|
||||
condition = {
|
||||
@MPJMappingCondition(column = "sex", value = "0"),//sex = '0' 默认条件是等于
|
||||
@MPJMappingCondition(column = "name", value = "张三", keyWord = SqlKeyword.LIKE)},//name like '%a%'
|
||||
apply = @MPJMappingApply(value = "id between 1 and 20"))//拼接sql 同 wrapper.apply()
|
||||
private List<UserDO> childUserCondition;
|
||||
|
||||
/**
|
||||
* 查询地址 (一对多)
|
||||
*/
|
||||
|
@ -16,12 +16,12 @@ QQ群:1022221898
|
||||
<dependency>
|
||||
<groupId>com.github.yulichang</groupId>
|
||||
<artifactId>mybatis-plus-join</artifactId>
|
||||
<version>1.2.0</version>
|
||||
<version>1.2.1</version>
|
||||
</dependency>
|
||||
```
|
||||
- Gradle
|
||||
```
|
||||
implementation group: 'com.github.yulichang', name: 'mybatis-plus-join', version: '1.2.0'
|
||||
implementation group: 'com.github.yulichang', name: 'mybatis-plus-join', version: '1.2.1'
|
||||
```
|
||||
或者clone代码到本地执行 mvn install, 再引入以上依赖
|
||||
<br>
|
||||
|
Loading…
x
Reference in New Issue
Block a user