test: 条件嵌套。

This commit is contained in:
Suomm 2023-08-14 11:33:23 +08:00
parent 806f5bef06
commit d44d2c8225

View File

@ -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());
}
}