Authored by fanzelei

update

package com.monitor.influxdb.mapper.impl;
import com.monitor.common.contants.InfluxDBContants;
import com.monitor.influxdb.InfluxDBModel;
import com.monitor.influxdb.InfluxDBQuery;
import com.monitor.influxdb.InluxDBSingle;
import com.monitor.influxdb.mapper.IZkMapper;
import com.monitor.influxdb.model.ZkInfo;
import com.monitor.model.domain.PageBean;
import org.influxdb.InfluxDB;
import org.influxdb.dto.Point;
import org.influxdb.dto.QueryResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
... ... @@ -42,19 +46,21 @@ public class ZkMapper extends InfluxDBQuery implements IZkMapper {
@Override
public int selectCountByCodition(PageBean page) {
InfluxDBModel influxDBModel=inluxDBSingle.getInfluxDBByName(InfluxDBContants.ALARM);
String command = "SELECT COUNT(id) FROM "+InfluxDBContants.ZOOKEEPER_ALARM;
return query(influxDBName, command, InfluxDBContants.ZOOKEEPER_ALARM,
"ZkMapper", "selectCountByCodition");
QueryResult result= query(influxDBModel.getName(), command, InfluxDBContants.ZOOKEEPER_ALARM);
return 0;
}
@Override
public List<ZkInfo> selectZkInfosByCodition(PageBean page) {
InfluxDBModel influxDBModel=inluxDBSingle.getInfluxDBByName(InfluxDBContants.ALARM);
String command="SELECT id, hostIp, isLive from "+InfluxDBContants.ZOOKEEPER_ALARM+
" ORDER BY time DESC LIMIT " + page.getParams().get("pageSize") +
" OFFSET " + page.getParams().get("startIndex");
return query(influxDBName, command, InfluxDBContants.ZOOKEEPER_ALARM,
"ZkMapper", "selectZkInfosByCodition");
QueryResult result= query(influxDBModel.getName(), command, InfluxDBContants.ZOOKEEPER_ALARM);
return null;
}
}
... ...
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="monitor-service-middleware">
<wb-resource deploy-path="/" source-path="/src/main/java"/>
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
</wb-module>
</project-modules>
... ...
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<installed facet="java" version="1.8"/>
<installed facet="jst.utility" version="1.0"/>
</faceted-project>
... ...
disabled=06target
eclipse.preferences.version=1
... ...