Commit a77a7c1d by huluobin

后台访问请求头

parent be56b461
......@@ -42,4 +42,6 @@ public class GetTechnicianPageRequest {
private List<LocalDateTime> date_utc;
private Integer technician_id;
}
......@@ -48,7 +48,9 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
......@@ -362,8 +364,9 @@ public class Schedule {
.status(1)
.technician_id(storeTechnician.getId())
.build();
HttpEntity<GetTechnicianPageRequest> allHttpEntity = new HttpEntity<>(allRequest);
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
HttpEntity<GetTechnicianPageRequest> allHttpEntity = new HttpEntity<>(allRequest, headers);
AdminTechnicianScore monthAdminResult = restTemplate.exchange(gogirlProperties.getAdminBackendUrl(), HttpMethod.POST, allHttpEntity, responseBodyType)
.getBody()
......@@ -384,7 +387,7 @@ public class Schedule {
.technician_id(storeTechnician.getId())
.build();
HttpEntity<GetTechnicianPageRequest> monthHttpEntity = new HttpEntity<>(monthRequest);
HttpEntity<GetTechnicianPageRequest> monthHttpEntity = new HttpEntity<>(monthRequest, headers);
AdminTechnicianScore allAdminResult = restTemplate.exchange(gogirlProperties.getAdminBackendUrl(), HttpMethod.POST, monthHttpEntity, responseBodyType)
.getBody()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment