|
@@ -53,18 +53,26 @@ public class OrderSalesDetailController extends BaseController
|
|
|
@ResponseBody
|
|
|
public Object list(HttpServletRequest request)
|
|
|
{
|
|
|
- //设置为form方式
|
|
|
- HttpHeaders headers = new HttpHeaders();
|
|
|
- headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
|
|
|
- MultiValueMap<String, Object> map = MapDataUtil.convertMultiValueMap(request);
|
|
|
-
|
|
|
- HttpEntity<Object> requestEntity
|
|
|
- = new HttpEntity<>(map, headers);
|
|
|
//走网关
|
|
|
//String url = cloudPath+"order"+request.getRequestURI();
|
|
|
//不走网关
|
|
|
String url = queryUrl+request.getRequestURI();
|
|
|
- String str = restTemplate.postForObject(url ,requestEntity,String.class);
|
|
|
+ String str = "";
|
|
|
+ try {
|
|
|
+ //设置为form方式
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
|
|
|
+ MultiValueMap<String, Object> map = MapDataUtil.convertMultiValueMap(request);
|
|
|
+
|
|
|
+ HttpEntity<Object> requestEntity
|
|
|
+ = new HttpEntity<>(map, headers);
|
|
|
+ str = restTemplate.postForObject(url ,requestEntity,String.class);
|
|
|
+ } catch (Exception e){
|
|
|
+ logger.error("查找目标达成列表接口报错:"+url,e);
|
|
|
+ throw e;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
return str;
|
|
|
}
|
|
|
|
|
@@ -78,9 +86,14 @@ public class OrderSalesDetailController extends BaseController
|
|
|
//String queryUrl = cloudPath+"order/order/orderSalesDetail/info/"+id;
|
|
|
//不走网关
|
|
|
String url = queryUrl + "/order/orderSalesDetail/info/"+id;
|
|
|
- String str = restTemplate.getForObject(url, String.class);
|
|
|
- OrderSalesDetail orderSalesDetail = JSONObject.toJavaObject(JSON.parseObject(str),OrderSalesDetail.class);
|
|
|
- mmap.put("orderSalesDetail", orderSalesDetail);
|
|
|
+ try {
|
|
|
+ String str = restTemplate.getForObject(url, String.class);
|
|
|
+ OrderSalesDetail orderSalesDetail = JSONObject.toJavaObject(JSON.parseObject(str),OrderSalesDetail.class);
|
|
|
+ mmap.put("orderSalesDetail", orderSalesDetail);
|
|
|
+ } catch (Exception e){
|
|
|
+ logger.error("查找目标达成详情接口报错:"+url,e);
|
|
|
+ throw e;
|
|
|
+ }
|
|
|
return prefix + "/edit";
|
|
|
}
|
|
|
|