@RequestMapping("node-onoffline-log-get")
 public RestfulResponse delNodeGroup(NodeOnOfflineLogRequest request) {
   RestfulResponse response = new RestfulResponse();
   Long results = nodeOnOfflineLogRepo.count(request);
   response.setResults(results.intValue());
   if (results > 0) {
     List<NodeOnOfflineLog> rows = nodeOnOfflineLogRepo.select(request);
     response.setRows(rows);
   } else {
     response.setRows(new ArrayList<Object>(0));
   }
   response.setSuccess(true);
   return response;
 }
  /** 记录节点上下线日志 */
  private void addLog(NotifyEvent event, List<Node> nodes) {
    List<NodeOnOfflineLog> logs = new ArrayList<NodeOnOfflineLog>(nodes.size());

    for (Node node : nodes) {
      NodeOnOfflineLog log = new NodeOnOfflineLog();
      log.setLogTime(new Date());
      log.setEvent(event == NotifyEvent.ADD ? "ONLINE" : "OFFLINE");

      log.setClusterName(node.getClusterName());
      log.setCreateTime(node.getCreateTime());
      log.setGroup(node.getGroup());
      log.setHostName(node.getHostName());
      log.setIdentity(node.getIdentity());
      log.setIp(node.getIp());
      log.setPort(node.getPort());
      log.setThreads(node.getThreads());
      log.setNodeType(node.getNodeType());

      logs.add(log);
    }

    nodeOnOfflineLogRepo.insert(logs);
  }