| | |
| | | package org.sxkj.gd.xingtu; |
| | | |
| | | import lombok.SneakyThrows; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.redis.cache.BladeRedis; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | |
| | | * @Date 2026/1/26 15:22 |
| | | * @Version 1.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class JianXingtuApiService { |
| | | |
| | |
| | | } |
| | | HttpHeaders headers = new HttpHeaders(); |
| | | headers.set("authorization", token); |
| | | |
| | | log.info("请求外部接口: {} {}", url, body); |
| | | HttpEntity<Object> entity = new HttpEntity<>(body, headers); |
| | | ResponseEntity<R> response = restTemplate.exchange(url, HttpMethod.POST, entity, R.class); |
| | | log.info("响应外部接口: {}", response); |
| | | if (response.getStatusCode().is2xxSuccessful()) { |
| | | R responseBody = response.getBody(); |
| | | if (responseBody != null) { |