All Downloads are FREE. Search and download functionalities are using the official Maven repository.

yui.comn.mybatisx.extension.methods.SoftListMapsByMap Maven / Gradle / Ivy

package yui.comn.mybatisx.extension.methods;

import java.util.Map;

import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.SqlSource;

import com.baomidou.mybatisplus.core.metadata.TableInfo;

import yui.comn.mybatisx.core.enums.SoftSqlMethod;

/**
 * 

* 根据 queryWrapper 条件查询多条数据 *

* * @author yuyi ([email protected]) */ public class SoftListMapsByMap extends AbstractSoftMethod { private static final long serialVersionUID = 3697945170729017262L; @Override public MappedStatement injectMappedStatement(Class mapperClass, Class modelClass, TableInfo tableInfo) { SoftSqlMethod sqlMethod = SoftSqlMethod.LIST_MAPS_BY_MAP; String sql = String.format(sqlMethod.getSql(), sqlSelectColumns(tableInfo, false), tableInfo.getTableName(), sqlWhereByMap(tableInfo)); SqlSource sqlSource = languageDriver.createSqlSource(configuration, sql, modelClass); return addSelectMappedStatement(mapperClass, sqlMethod.getMethod(), sqlSource, Map.class); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy