|
@@ -288,11 +288,14 @@ public class ZhiHouseService {
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
- public Collection<JSONObject> queryRecomendsByType(Integer type){
|
|
|
+ public Collection<JSONObject> queryRecomendsByType(Integer type,String token){
|
|
|
Map<String, Object> mp = new HashMap<>();
|
|
|
mp.put("type", type);
|
|
|
String url = zhiHouseHost + "recommend/selectByType";
|
|
|
- ResponseEntity<ReturnDTO> responseEntity = restTemplate.postForEntity(url, mp,ReturnDTO.class);
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.add("token", token);
|
|
|
+ HttpEntity<Object> formEntity = new HttpEntity<>(mp, headers);
|
|
|
+ ResponseEntity<ReturnDTO> responseEntity = restTemplate.postForEntity(url, formEntity,ReturnDTO.class);
|
|
|
if(responseEntity.getStatusCode()!= HttpStatus.OK){
|
|
|
throw new CommonBaseException(ResultCodeEnum.D100);
|
|
|
}
|