微调
This commit is contained in:
@@ -6,6 +6,7 @@ import com.njcn.gather.result.service.impl.ResultServiceImpl;
|
||||
import com.njcn.http.util.RestTemplateUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -18,8 +19,8 @@ import java.util.Map;
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class DataCheckAsyncNotifier {
|
||||
|
||||
private final static String url="http://172.17.100.111:18091/steady/checksquare/create";
|
||||
@Value("${dataCheck.url}")
|
||||
private String url;
|
||||
private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
private final RestTemplateUtil restTemplateUtil;
|
||||
|
||||
@@ -147,7 +147,8 @@ public class ResultServiceImpl implements IResultService {
|
||||
private final DataCheckAsyncNotifier dataCheckAsyncNotifier;
|
||||
private final RestTemplateUtil restTemplateUtil;
|
||||
|
||||
public static final String CHECKSQUARE_CREATE_URL = "http://192.168.2.147:18091/api/steady/checksquare/create";
|
||||
@org.springframework.beans.factory.annotation.Value("${dataCheck.url}")
|
||||
private String url;
|
||||
private static final DateTimeFormatter CHECKSQUARE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
private final Map<String, NotifyState> notifyStates = new ConcurrentHashMap<>();
|
||||
|
||||
@@ -225,7 +226,7 @@ public class ResultServiceImpl implements IResultService {
|
||||
request.setIndicatorCodes(Arrays.asList("V_RMS"));
|
||||
request.setTimeStart("2026-06-08 00:00:00");
|
||||
request.setTimeEnd("2026-06-08 23:59:59");
|
||||
String s = restTemplateUtil.postJson(CHECKSQUARE_CREATE_URL, request, String.class);
|
||||
String s = restTemplateUtil.postJson(url, request, String.class);
|
||||
JSONObject obj = JSONUtil.parseObj(s);
|
||||
DataCheckResultVO data = BeanUtil.copyProperties(obj.get("data"), DataCheckResultVO.class);
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user