| | |
| | | * @param tags 标签 |
| | | * @param fields 字段 |
| | | */ |
| | | public void writeData(String measurement, Map<String, String> tags, Map<String, Object> fields) { |
| | | public void writeData(String measurement, Map<String, String> tags, Map<String, Object> fields,Long timestamp) { |
| | | Point point = Point.measurement(measurement) |
| | | .setTags(tags) |
| | | .setFields(fields) |
| | | .setTimestamp(Instant.now().toEpochMilli(), WritePrecision.MS); |
| | | .setTimestamp(timestamp, WritePrecision.MS); |
| | | try { |
| | | influxDBClient.writePoint(point); |
| | | } catch (Exception e) { |