public class SelectSortIncludeLogicDeleteMapperTemplate extends AbstractMapperTemplate
xmlLanguageDriver| Constructor and Description |
|---|
SelectSortIncludeLogicDeleteMapperTemplate() |
| Modifier and Type | Method and Description |
|---|---|
String |
selectListWithSortIncludeLogicDelete(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,不会过滤掉已经被标记为逻辑删除(
Column.logicDelete())的数据,生成 select 语句。 |
String |
selectListWithSortIncludeLogicDelete2(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,不会过滤掉已经被标记为逻辑删除(
Column.logicDelete())的数据,生成 select 语句。 |
dynamicSql, getNodeContent, getWhereExtend, getWhereExtendCondition, getWhereExtraConditionpublic SelectSortIncludeLogicDeleteMapperTemplate()
public String selectListWithSortIncludeLogicDelete(TableInfo tableInfo, org.apache.ibatis.mapping.MappedStatement ms)
Column.logicDelete())的数据,生成 select 语句。
示例如下:
SELECT id,... FROM table_name
<where>
<if test="condition.id != null">
and id = #{condition.id}
</if>
</where>
<if test="orders != null and orders.size > 0">
order by
<foreach collection="orders" item="item" separator=",">
${item.property} ${item.direction}
</foreach>
</if>
tableInfo - 数据库表结构信息ms - sql语句节点信息,会将生成的sql语句替换掉原有的 MappedStatement.sqlSourceSelectListIncludeLogicDeleteMapper.selectListWithSortIncludeLogicDelete(Object,
List)public String selectListWithSortIncludeLogicDelete2(TableInfo tableInfo, org.apache.ibatis.mapping.MappedStatement ms)
Column.logicDelete())的数据,生成 select 语句。
示例如下:
SELECT id,... FROM table_name
<where>
<if test="condition.id != null">
and id = #{condition.id}
</if>
<if test="extraCondition != null">
<include refid="Where_Extra_Condition" />
</if>
</where>
<if test="orders != null and orders.size > 0">
order by
<foreach collection="orders" item="item" separator=",">
${item.property} ${item.direction}
</foreach>
</if>
tableInfo - 数据库表结构信息ms - sql语句节点信息,会将生成的sql语句替换掉原有的 MappedStatement.sqlSourceSelectListIncludeLogicDeleteMapper.selectListWithSortIncludeLogicDelete2(Object,
java.util.Map, List)Copyright © 2018–2021. All rights reserved.