influxORM代码调整
This commit is contained in:
@@ -8,6 +8,9 @@ import org.springframework.beans.factory.FactoryBean;
|
||||
import javax.annotation.Resource;
|
||||
import java.lang.reflect.Proxy;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
*/
|
||||
public class InfluxProxyMapperFactory<T> implements FactoryBean {
|
||||
|
||||
@Resource
|
||||
|
||||
@@ -16,6 +16,9 @@ import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Parameter;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
*/
|
||||
public class ProxyMapper implements InvocationHandler {
|
||||
|
||||
private ParameterHandler parameterHandler;
|
||||
|
||||
@@ -17,6 +17,9 @@ import javax.annotation.PostConstruct;
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
*/
|
||||
public class ProxyMapperRegister {
|
||||
|
||||
private String mapperLocation;
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.njcn.influx.support.ICFunction;
|
||||
import com.njcn.influx.utils.LambdaUtil;
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
@@ -652,14 +653,14 @@ public class InfluxQueryWrapper {
|
||||
sqlSelect.append(InfluxDbSqlConstant.ALL)
|
||||
.append(InfluxDbSqlConstant.FROM)
|
||||
.append(InfluxDbSqlConstant.DQM)
|
||||
.append(measurement.getSimpleName().toLowerCase())
|
||||
.append(((Measurement) measurement.getAnnotation(Measurement.class)).name())
|
||||
.append(InfluxDbSqlConstant.DQM);
|
||||
} else {
|
||||
//将集合处理成查询属性
|
||||
sqlSelect.append(String.join(StrPool.COMMA, selectColumns))
|
||||
.append(InfluxDbSqlConstant.FROM)
|
||||
.append(InfluxDbSqlConstant.DQM)
|
||||
.append(measurement.getSimpleName().toLowerCase())
|
||||
.append( ((Measurement) measurement.getAnnotation(Measurement.class)).name())
|
||||
.append(InfluxDbSqlConstant.DQM);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user