Commit 51b8abee authored by hewei's avatar hewei

版本说明

parent 5662c7f9
...@@ -174,12 +174,13 @@ public class Test { ...@@ -174,12 +174,13 @@ public class Test {
public static void main(String[] args) { public static void main(String[] args) {
// -----------------------------------example----------------------------------- // -----------------------------------example-----------------------------------
// 表Example.Criteria增加了工厂方法example()支持,使用后可链式构建查询条件使用example()返回Example对象 // 表Example.Criteria增加了工厂方法example()支持,使用后可链式构建查询条件使用example()返回Example对象
TbExample ex = new TbExample() this.tbMapper.selectByExample(
new TbExample()
.createCriteria() .createCriteria()
.andField1EqualTo(1) .andField1EqualTo(1)
.andField2EqualTo("xxx") .andField2EqualTo("xxx")
.example(); .example()
this.tbMapper.selectByExample(ex); );
// -----------------------------------andIf----------------------------------- // -----------------------------------andIf-----------------------------------
// Criteria增强了链式调用,现在一些按条件增加的查询条件不会打乱链式调用了 // Criteria增强了链式调用,现在一些按条件增加的查询条件不会打乱链式调用了
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment