如何使用 MyBatis Generator Example 类创建复杂的 where 子句?

问题描述

我想创建一个像这样的 where 条件:“A 和 B 和(C 或 D)”。 但是我不知道如何使用 MyBatis Generator Example 类来创建它。 当我将where子句更改为“(A和B和C)或(A和B和D)”时,我可以做到这一点,但我认为上面的更好。 MyBatis 生成器文档:http://mybatis.org/generator/generatedobjects/exampleClassUsage.html.

解决方法

在 Mybatis Doc 的复杂查询部分,它的示例与您的问题类似。