| | |
| | | stationChange.setType(type); |
| | | List<String> collect = siteIds.stream().map(String::valueOf).collect(Collectors.toList()); |
| | | stationChange.setStationIds(collect); |
| | | HttpRequest post = HttpUtil.createPost(operator.getTestUrl() + InterfaceUrlEnum.NOTIFICATION_STATION_CHANGE.getUrl()); |
| | | HttpRequest post = HttpUtil.createPost(operator.getUrl() + InterfaceUrlEnum.NOTIFICATION_STATION_CHANGE.getUrl()); |
| | | buildBody(post, stationChange, operator); |
| | | HttpResponse execute = post.execute(); |
| | | if(200 != execute.getStatus()){ |
| | | log.error("推送站点变更通知失败:" + execute.body()); |
| | | log.error("推送三方平台站点变更通知失败:" + execute.body()); |
| | | return null; |
| | | } |
| | | return JSON.parseObject(execute.body(), NotificationStationChangeResult.class); |
| | | log.info("推送三方平台站点变更通知响应:" + execute.body()); |
| | | BaseResult baseResult = JSON.parseObject(execute.body(), BaseResult.class); |
| | | Integer Ret = baseResult.getRet(); |
| | | if(0 != Ret){ |
| | | log.error("推送三方平台站点变更通知失败:" + baseResult.getMsg()); |
| | | return null; |
| | | } |
| | | //解密参数 |
| | | String decrypt = AESUtil.decrypt(baseResult.getData(), operator.getDataSecret(), operator.getDataSecretIv()); |
| | | log.info("推送三方平台站点变更通知Data:" + decrypt); |
| | | NotificationStationChangeResult notificationStationChangeResult = JSON.parseObject(decrypt, NotificationStationChangeResult.class); |
| | | return notificationStationChangeResult; |
| | | } |
| | | |
| | | |