sql构造器参数名
可将Wrapper用于自定义xml中,但要使用该字段生成名参数名,并将生成后的sql放在xml中
示例:
interface EntityMapper {
<W extends Wrapper<Entity, W, Column>, Column> List<Entity> select(@Param(Constants.WRAPPER)WrapperQuery<Entity, QueryWrapper<Entity, W, Column>> wrapper);
}
xxx.xml
<select id="select">
SELECT * FROM table
<where>
${ew.build().getCondition()}
</where>
</select>
Mapper示例可跳转至: