12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- package com.ruoyi.ucp.feign;
- import com.ruoyi.ucp.entity.DoubleStatData;
- import com.ruoyi.ucp.entity.PointData;
- import org.springframework.cloud.openfeign.FeignClient;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RequestParam;
- import java.net.URI;
- import java.util.List;
- import java.util.Map;
- @FeignClient("adapter")
- public interface AdapterApi {
- @GetMapping("/latest2")
- List<PointData> getLatest2(URI baseUri, @RequestParam("keys") String keys);
- // @GetMapping("/latest")
- // Map<String, PointData> getLatest(URI baseUri, @RequestParam("keys") String keys);
- @PostMapping("/latests")
- // @Headers("Content-Type: application/json; charset=UTF-8")
- Map<String, PointData> getLatest(URI baseUri, @RequestBody String keys);
- @GetMapping("/history/snap")
- List<PointData> getHistorySnap(URI baseUri, @RequestParam("tagName") String tagName,
- @RequestParam("startTs") long startTs,
- @RequestParam("endTs") long endTs,
- @RequestParam("interval") int interval);
- @GetMapping("/history/raw")
- List<PointData> getHistoryRaw(URI baseUri, @RequestParam("tagName") String tagName,
- @RequestParam("startTs") long startTs,
- @RequestParam("endTs") long endTs);
- @GetMapping("/history/stat2")
- DoubleStatData getHistoryStat(URI baseUri, @RequestParam("tagName") String tagName,
- @RequestParam("startTs") long startTs,
- @RequestParam("endTs") long endTs);
- //@RequestParam("interval") int interval);
- @GetMapping("/history/stat")
- List<DoubleStatData> getHistoryStat2(URI baseUri, @RequestParam("tagName") String tagName,
- @RequestParam("startTs") long startTs,
- @RequestParam("endTs") long endTs,
- @RequestParam("interval") int interval);
- // @GetMapping("/history/section")
- // Map<String, PointData> getHistorySection(URI baseUri, @RequestParam("tagNames") String tagNames,
- // @RequestParam("ts") long ts);
- @PostMapping("/history/section")
- Map<String, PointData> getHistorySection(URI baseUri, @RequestBody String tagNames,
- @RequestParam("ts") long ts);
- @GetMapping("/history/section2")
- List<PointData> getHistorySection2(URI baseUri, @RequestParam("tagName") String tagName,
- @RequestParam("ts") long ts);
- // @PostMapping("/latest2")
- // Boolean writeHistory(URI baseUri, @RequestBody PointData tsData);
- //
- // @PostMapping("/latest2/batch")
- // Boolean writeHistoryBatch(URI baseUri, @RequestBody List<PointData> tsData);
- @PostMapping("/save")
- Boolean writeHistory(URI baseUri, @RequestBody PointData tsData);
- @PostMapping("/save/batch")
- Boolean writeHistoryBatch(URI baseUri, @RequestBody List<PointData> tsData);
- }
|