feat(biz): 更新动环监控指标转换逻辑与HTTP客户端初始化流程

- 在LcPowerEnvMonitorMetricEntityConvert中新增pointTypeName字段映射
- 修改PowerEnvResponseDataDTO的content字段类型从List<T>为T
- 移除RetryableHttpClient中的@PostConstruct注解及初始化方法
- 删除不必要的import语句
This commit is contained in:
2025-12-05 17:19:13 +08:00
parent 1296e18f0a
commit 0af4264ba7
3 changed files with 2 additions and 10 deletions

View File

@@ -49,6 +49,7 @@ public interface LcPowerEnvMonitorMetricEntityConvert {
entity.setValueType(metric.getValueType());
entity.setValueTypeName(getValueTypeName(metric.getValueType()));
entity.setPointType(metric.getType());
entity.setPointTypeName(getPointTypeName(metric.getType()));
entity.setMetricValue(metric.getValue());
entity.setUpdateTime(LocalDateTimeUtil.of(metric.getUpdateTime()));
return entity;

View File

@@ -4,8 +4,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;
/**
* 动环系统接口响应体
*
@@ -40,6 +38,6 @@ public class PowerEnvResponseDataDTO<T> {
* 响应内容
*/
@Schema(description = "响应内容")
private List<T> content;
private T content;
}

View File

@@ -13,7 +13,6 @@ import org.springframework.stereotype.Component;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.web.client.RestTemplate;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.Map;
import java.util.Objects;
@@ -64,12 +63,6 @@ public class RetryableHttpClient {
@Resource
private RestTemplate restTemplate;
@PostConstruct
public void init() {
// 初始化时获取一次访问令牌
refreshAccessToken();
}
/**
* 发送GET请求并获取响应数据
*