From c78abbb10fed9e2e7e2d36a1a5ee76cb72754fac Mon Sep 17 00:00:00 2001 From: Jay <csj123456> Date: 星期四, 23 一月 2025 11:03:53 +0800 Subject: [PATCH] 增加log,增加查询参数 --- shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/SyncSegmentedDataTask.java | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/SyncSegmentedDataTask.java b/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/SyncSegmentedDataTask.java index ecdea16..59a4016 100644 --- a/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/SyncSegmentedDataTask.java +++ b/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/SyncSegmentedDataTask.java @@ -43,7 +43,7 @@ private static final String QUERY_SEGMENTED_DATA_URL = "http://10.88.7.107:8081/SG.Web/api/services/nYJK/DiagnosticsSg/QuerySegmentedDataAsync"; - private static final String USERNAME = "MX001@sgis"; + private static final String USERNAME = "Mx001@sgis"; private static final String PASSWORD = "123456"; @@ -73,9 +73,7 @@ String accessToken = "Bearer " + getAccessToken(requestAccessToken); //获取保存后的数据 List<ElectricityPriceSegmentedDTO> list = getElectricityPriceSegmentedList(accessToken); - list.forEach(item -> { - mcsApi.createElectricityPrice(item); - }); + mcsApi.createElectricityPrice(list); } catch (Exception ex) { logger.error("syncSegmentedDataTask运行异常"); ex.printStackTrace(); @@ -98,6 +96,7 @@ public String getAccessToken(RequestAccessTokenVO requestAccessToken) { String accessToken = ""; + logger.info("请求参数:" + JSON.toJSONString(requestAccessToken)); String resp = HttpUtils.sendPost(ACCESS_TOKEN_URL, JSON.toJSONString(requestAccessToken)); logger.info("获取token的返回值:" + resp); JSONObject jsonObject = JSON.parseObject(resp); -- Gitblit v1.9.3