influxORM代码调整

This commit is contained in:
2023-04-27 19:12:35 +08:00
parent bbb830bbdb
commit b29104cfe2
4 changed files with 12 additions and 2 deletions

View File

@@ -8,6 +8,9 @@ import org.springframework.beans.factory.FactoryBean;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.lang.reflect.Proxy; import java.lang.reflect.Proxy;
/**
* @author hongawen
*/
public class InfluxProxyMapperFactory<T> implements FactoryBean { public class InfluxProxyMapperFactory<T> implements FactoryBean {
@Resource @Resource

View File

@@ -16,6 +16,9 @@ import java.lang.reflect.Method;
import java.lang.reflect.Parameter; import java.lang.reflect.Parameter;
import java.util.List; import java.util.List;
/**
* @author hongawen
*/
public class ProxyMapper implements InvocationHandler { public class ProxyMapper implements InvocationHandler {
private ParameterHandler parameterHandler; private ParameterHandler parameterHandler;

View File

@@ -17,6 +17,9 @@ import javax.annotation.PostConstruct;
import java.io.IOException; import java.io.IOException;
import java.util.HashSet; import java.util.HashSet;
/**
* @author hongawen
*/
public class ProxyMapperRegister { public class ProxyMapperRegister {
private String mapperLocation; private String mapperLocation;

View File

@@ -9,6 +9,7 @@ import com.njcn.influx.support.ICFunction;
import com.njcn.influx.utils.LambdaUtil; import com.njcn.influx.utils.LambdaUtil;
import lombok.Data; import lombok.Data;
import org.influxdb.annotation.Column; import org.influxdb.annotation.Column;
import org.influxdb.annotation.Measurement;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.*; import java.util.*;
@@ -652,14 +653,14 @@ public class InfluxQueryWrapper {
sqlSelect.append(InfluxDbSqlConstant.ALL) sqlSelect.append(InfluxDbSqlConstant.ALL)
.append(InfluxDbSqlConstant.FROM) .append(InfluxDbSqlConstant.FROM)
.append(InfluxDbSqlConstant.DQM) .append(InfluxDbSqlConstant.DQM)
.append(measurement.getSimpleName().toLowerCase()) .append(((Measurement) measurement.getAnnotation(Measurement.class)).name())
.append(InfluxDbSqlConstant.DQM); .append(InfluxDbSqlConstant.DQM);
} else { } else {
//将集合处理成查询属性 //将集合处理成查询属性
sqlSelect.append(String.join(StrPool.COMMA, selectColumns)) sqlSelect.append(String.join(StrPool.COMMA, selectColumns))
.append(InfluxDbSqlConstant.FROM) .append(InfluxDbSqlConstant.FROM)
.append(InfluxDbSqlConstant.DQM) .append(InfluxDbSqlConstant.DQM)
.append(measurement.getSimpleName().toLowerCase()) .append( ((Measurement) measurement.getAnnotation(Measurement.class)).name())
.append(InfluxDbSqlConstant.DQM); .append(InfluxDbSqlConstant.DQM);
} }