Authored by fanzelei

update

1 package com.monitor.influxdb.mapper.impl; 1 package com.monitor.influxdb.mapper.impl;
2 2
3 import com.monitor.common.contants.InfluxDBContants; 3 import com.monitor.common.contants.InfluxDBContants;
  4 +import com.monitor.influxdb.InfluxDBModel;
4 import com.monitor.influxdb.InfluxDBQuery; 5 import com.monitor.influxdb.InfluxDBQuery;
5 import com.monitor.influxdb.InluxDBSingle; 6 import com.monitor.influxdb.InluxDBSingle;
6 import com.monitor.influxdb.mapper.IZkMapper; 7 import com.monitor.influxdb.mapper.IZkMapper;
7 import com.monitor.influxdb.model.ZkInfo; 8 import com.monitor.influxdb.model.ZkInfo;
8 import com.monitor.model.domain.PageBean; 9 import com.monitor.model.domain.PageBean;
  10 +
  11 +import org.influxdb.InfluxDB;
9 import org.influxdb.dto.Point; 12 import org.influxdb.dto.Point;
  13 +import org.influxdb.dto.QueryResult;
10 import org.springframework.beans.factory.annotation.Autowired; 14 import org.springframework.beans.factory.annotation.Autowired;
11 import org.springframework.stereotype.Component; 15 import org.springframework.stereotype.Component;
12 16
@@ -42,19 +46,21 @@ public class ZkMapper extends InfluxDBQuery implements IZkMapper { @@ -42,19 +46,21 @@ public class ZkMapper extends InfluxDBQuery implements IZkMapper {
42 46
43 @Override 47 @Override
44 public int selectCountByCodition(PageBean page) { 48 public int selectCountByCodition(PageBean page) {
  49 + InfluxDBModel influxDBModel=inluxDBSingle.getInfluxDBByName(InfluxDBContants.ALARM);
45 String command = "SELECT COUNT(id) FROM "+InfluxDBContants.ZOOKEEPER_ALARM; 50 String command = "SELECT COUNT(id) FROM "+InfluxDBContants.ZOOKEEPER_ALARM;
46 - return query(influxDBName, command, InfluxDBContants.ZOOKEEPER_ALARM,  
47 - "ZkMapper", "selectCountByCodition"); 51 + QueryResult result= query(influxDBModel.getName(), command, InfluxDBContants.ZOOKEEPER_ALARM);
  52 + return 0;
48 53
49 } 54 }
50 55
51 @Override 56 @Override
52 public List<ZkInfo> selectZkInfosByCodition(PageBean page) { 57 public List<ZkInfo> selectZkInfosByCodition(PageBean page) {
  58 + InfluxDBModel influxDBModel=inluxDBSingle.getInfluxDBByName(InfluxDBContants.ALARM);
53 String command="SELECT id, hostIp, isLive from "+InfluxDBContants.ZOOKEEPER_ALARM+ 59 String command="SELECT id, hostIp, isLive from "+InfluxDBContants.ZOOKEEPER_ALARM+
54 " ORDER BY time DESC LIMIT " + page.getParams().get("pageSize") + 60 " ORDER BY time DESC LIMIT " + page.getParams().get("pageSize") +
55 " OFFSET " + page.getParams().get("startIndex"); 61 " OFFSET " + page.getParams().get("startIndex");
56 62
57 - return query(influxDBName, command, InfluxDBContants.ZOOKEEPER_ALARM,  
58 - "ZkMapper", "selectZkInfosByCodition"); 63 + QueryResult result= query(influxDBModel.getName(), command, InfluxDBContants.ZOOKEEPER_ALARM);
  64 + return null;
59 } 65 }
60 } 66 }
  1 +<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
  2 + <wb-module deploy-name="monitor-service-middleware">
  3 + <wb-resource deploy-path="/" source-path="/src/main/java"/>
  4 + <wb-resource deploy-path="/" source-path="/src/main/resources"/>
  5 + </wb-module>
  6 +</project-modules>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<faceted-project>
  3 + <installed facet="java" version="1.8"/>
  4 + <installed facet="jst.utility" version="1.0"/>
  5 +</faceted-project>
  1 +disabled=06target
  2 +eclipse.preferences.version=1