public static <T> RuiResponse<RuiPageResponse<T>> requestList(String url, Map params,ParameterizedTypeReference>> responseType, String token){
HttpHeaders headers = new HttpHeaders();
headers.set("accessToken",token);
HttpEntity<MultiValueMap<String, Object>> request = new HttpEntity<>(null, headers);
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<RuiResponse<RuiPageResponse<T>>> entity = restTemplate.exchange(url, HttpMethod.GET, request, responseType, params);
Optional.ofNullable(entity).map(ResponseEntity::getBody).map(RuiResponse::getCode).filter(code-> RuiHttpStatus.CODE_2.getCode().equals(code)).orElseThrow(()->new RRException("查询状态异常"));
public RuiPageResponse<GaspStaff> getInfo(Map<String, String> params) {
ParameterizedTypeReference<RuiResponse<RuiPageResponse<GaspStaff>>> responseType = new ParameterizedTypeReference>>(){};
RuiResponse<RuiPageResponse<GaspStaff>> ruiPageResponseRuiResponse = ReqUtil.requestList(GaspStaffApiConstants.GASP_STAFF_LIST, params,responseType, tokenManager.getToken());
return ruiPageResponseRuiResponse.getData();