public interface Constants
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
COLLECTION |
static String |
ENTITY |
static String |
LIMIT |
static String |
LIMIT_1 |
static Pattern |
WHERE_PAT |
static String |
WRAPPER
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示例可跳转至:
|
static final Pattern WHERE_PAT
static final String WRAPPER
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示例可跳转至:com.fz.fbm.framework.mybatis.BaseMapper#selectList(WrapperQuery),
com.fz.fbm.framework.mybatis.BaseMapper#selectOne(WrapperQuery),
常量字段值Copyright © 2024. All rights reserved.