|
@@ -25,7 +25,7 @@ type InstrumentCompareData struct {
|
|
|
Min float64 `json:"min_val"`
|
|
|
}
|
|
|
|
|
|
-func (d *DcApiClient) ObtainRangeMaxMin (req *ItemHistoryReq) (resp *InstrumentCompareData, err error) {
|
|
|
+func (d *DcApiClient) ObtainRangeMaxMin (req *RangeMaxMinReq) (resp *InstrumentCompareData, err error) {
|
|
|
url := fmt.Sprintf("http://%s/api/dtgateway/v1/item-history/max-min", d.ServerIp)
|
|
|
h := httplib.Get(url)
|
|
|
h.Param("project_id", req.ProjectId)
|
|
@@ -35,13 +35,13 @@ func (d *DcApiClient) ObtainRangeMaxMin (req *ItemHistoryReq) (resp *InstrumentC
|
|
|
|
|
|
body, err := d.RequestMiddleProcess(h, req.ProjectId)
|
|
|
if err != nil {
|
|
|
- log.Println("GetItemHistory Error:", err)
|
|
|
+ log.Println("ObtainRangeMaxMin Error:", err)
|
|
|
return
|
|
|
}
|
|
|
result := &RangeMaxMinResp{}
|
|
|
err = json.Unmarshal(body, &result)
|
|
|
if err != nil {
|
|
|
- log.Println("GetItemHistory Error:", err)
|
|
|
+ log.Println("ObtainRangeMaxMin Error:", err)
|
|
|
return
|
|
|
}
|
|
|
if result.Code != 200 {
|