mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
test: 条件嵌套。
This commit is contained in:
parent
806f5bef06
commit
d44d2c8225
@ -131,4 +131,14 @@ public class DynamicConditionTest {
|
||||
System.out.println(queryWrapper.toSQL());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test08() {
|
||||
QueryWrapper queryWrapper = QueryWrapper.create().
|
||||
from(ACCOUNT)
|
||||
.where(ACCOUNT.ID.eq(1))
|
||||
.and(ACCOUNT.AGE.in(17, 18, 19).or(ACCOUNT.USER_NAME.eq("zhang san")));
|
||||
|
||||
System.out.println(queryWrapper.toSQL());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user