com.envision.sql.SqlHandler Maven / Gradle / Ivy
The newest version!
package com.envision.sql;
import com.google.common.collect.Lists;
import com.google.common.reflect.TypeToken;
import org.springframework.beans.BeanWrapper;
import org.springframework.beans.PropertyAccessorFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.lang.reflect.Type;
import java.util.List;
import java.util.Map;
/**
* @author qiweishi
* @date 2018/11/10
*/
public abstract class SqlHandler {
public final TypeToken typeToken = new TypeToken(getClass()) {
};
public final Type type = typeToken.getRawType();
@Autowired
private MarsMapper marsMapper;
public static String tmpSql;
@SuppressWarnings("unchecked")
public List execute(String sql, Object... params) throws IllegalAccessException, InstantiationException {
tmpSql = String.format(sql, params);
List