Search in sources :

Example 1 with TableColumn

use of top.xiajibagao.mybatis.plus.join.wrapper.column.TableColumn in project mybaits-plus-join by Createsequence.

the class AbstractDynamicResultWrapper method initLogicDelete.

/**
 * 若主表不为逻辑表,则获取其逻辑删除字段并添加到条件中
 *
 * @author huangchengxing
 * @date 2022/2/10 9:21
 */
protected void initLogicDelete() {
    if (isLogic || !tableInfo.isWithLogicDelete()) {
        return;
    }
    TableFieldInfo logicDeleteFieldInfo = tableInfo.getLogicDeleteFieldInfo();
    String notDeleteValue = tableInfo.getLogicDeleteFieldInfo().getLogicDeleteValue();
    whereIfNotNull(new TableColumn(this, logicDeleteFieldInfo.getColumn()), Condition.EQ, notDeleteValue);
}
Also used : TableFieldInfo(com.baomidou.mybatisplus.core.metadata.TableFieldInfo) TableColumn(top.xiajibagao.mybatis.plus.join.wrapper.column.TableColumn)

Aggregations

TableFieldInfo (com.baomidou.mybatisplus.core.metadata.TableFieldInfo)1 TableColumn (top.xiajibagao.mybatis.plus.join.wrapper.column.TableColumn)1