|
@@ -221,7 +221,10 @@ func (e *EnvItem) getCurrentData() (*ItemValueResp, error) {
|
|
|
}
|
|
|
|
|
|
if adjustValue && cache != nil && len(res.Data) > 0 {
|
|
|
- if rv, err := strconv.ParseFloat(res.Data[0].Val, 64); err == nil {
|
|
|
+ if rv, err := strconv.ParseInt(res.Data[0].Val, 10, 64); err == nil {
|
|
|
+ adjust, _ := e.GetAdjustInt64Val()
|
|
|
+ res.Data[0].Val = fmt.Sprintf("%d", rv+adjust)
|
|
|
+ } else if rv, err := strconv.ParseFloat(res.Data[0].Val, 64); err == nil {
|
|
|
adjust, _ := e.GetAdjustFloat64Val()
|
|
|
res.Data[0].Val = fmt.Sprintf("%f", rv+adjust)
|
|
|
}
|