Răsfoiți Sursa

华泰影像修改

Qchen 1 an în urmă
părinte
comite
60d6cb93c0

+ 4 - 2
src/main/java/com/ydtech/modules/order/components/huatai/HuiTaiUploadImageComponents.java

@@ -109,8 +109,10 @@ public class HuiTaiUploadImageComponents {
      */
     private HuaTaiImageInitParamResponse initParam(String domain, String token) {
         // token
-        String initParamUrl = domain + INIT_PARAM + System.currentTimeMillis() + "&token" + token;
-        HttpEntity<Object> httpEntity = new HttpEntity<>(null, HttpHeaders.EMPTY);
+        HttpHeaders httpHeaders = new HttpHeaders();
+        httpHeaders.setContentType(MediaType.APPLICATION_JSON);
+        String initParamUrl = domain + INIT_PARAM + System.currentTimeMillis() + "&token=" + token;
+        HttpEntity<Map<String, Object>> httpEntity = new HttpEntity<>(new HashMap<>(), httpHeaders);
         ResponseEntity<HuaTaiImageInitParamResponse> response = restTemplate.exchange(initParamUrl, HttpMethod.GET, httpEntity,
                 HuaTaiImageInitParamResponse.class);
         return response.getBody();