/*** 删除* @param url 地址* @param token token信息* @return RuiResponse*/public static RuiResponse> requestList(String url, Map params,ParameterizedTypeReference>> responseType, String token){HttpHeaders headers = new HttpHeaders();headers.set("accessToken",token);HttpEntity> request = new HttpEntity<>(null, headers);RestTemplate restTemplate = new RestTemplate();ResponseEntity>> 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("查询状态异常"));return entity.getBody();}
@Overridepublic RuiPageResponse getInfo(Map params) {ParameterizedTypeReference>> responseType = new ParameterizedTypeReference>>(){};RuiResponse> ruiPageResponseRuiResponse = ReqUtil.requestList(GaspStaffApiConstants.GASP_STAFF_LIST, params,responseType, tokenManager.getToken());return ruiPageResponseRuiResponse.getData();}
上一篇:拆一赔一还是赔二?拆迁户和征收方眼中的补偿标准为什么不一样? 拆迁补偿以什么为标准赔 拆一还二补偿
下一篇:新三板公司被判令赔偿投资者4900万元,最高法:高管违法要严罚 新三板股权纠纷案例一审 新三板上市公司被起诉有什么影响