|
|
@@ -7,6 +7,7 @@ import com.chinaitop.depot.supervise.service.depotStyleService;
|
|
7
|
7
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
8
|
8
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
9
|
9
|
|
|
|
10
|
+import org.springframework.beans.factory.annotation.Value;
|
|
10
|
11
|
import org.springframework.context.annotation.Bean;
|
|
11
|
12
|
import org.springframework.stereotype.Service;
|
|
12
|
13
|
import org.springframework.util.LinkedMultiValueMap;
|
|
|
@@ -25,12 +26,10 @@ public class depotStyleServiceImpl implements depotStyleService {
|
|
25
|
26
|
|
|
26
|
27
|
@Resource
|
|
27
|
28
|
private RestTemplate restTemplate;
|
|
28
|
|
-
|
|
29
|
|
- @Bean
|
|
30
|
|
- public RestTemplate restTemplate() {
|
|
31
|
|
- return new RestTemplate();
|
|
32
|
|
- }
|
|
33
|
29
|
|
|
|
30
|
+ @Value("${jsgjjsjUrl}")
|
|
|
31
|
+ private String jsgjjsjUrl;
|
|
|
32
|
+
|
|
34
|
33
|
|
|
35
|
34
|
@Override
|
|
36
|
35
|
public List<Map<String,Object>> getCameraPoint(Map<String,Object> map) {
|
|
|
@@ -146,7 +145,7 @@ public class depotStyleServiceImpl implements depotStyleService {
|
|
146
|
145
|
/**
|
|
147
|
146
|
* restTemplate调用
|
|
148
|
147
|
*/
|
|
149
|
|
- String url = "http://localhost:9022/recPublish/sendMessage";//
|
|
|
148
|
+ // String url = "http://localhost:9022/recPublish/sendMessage";//
|
|
150
|
149
|
// 发送post请求,并打印结果,以String类型接收响应结果JSON字符串
|
|
151
|
150
|
MultiValueMap<String, Object> sendMap = new LinkedMultiValueMap<>();
|
|
152
|
151
|
//Map<String, Object> sendMap = new HashMap<String, Object>();
|
|
|
@@ -162,7 +161,7 @@ public class depotStyleServiceImpl implements depotStyleService {
|
|
162
|
161
|
sendMap.add("tableName", tableName);
|
|
163
|
162
|
sendMap.add("orgId",orgId);
|
|
164
|
163
|
|
|
165
|
|
- String result = (String) restTemplate.postForObject(url, sendMap, String.class);
|
|
|
164
|
+ String result = (String) restTemplate.postForObject(jsgjjsjUrl, sendMap, String.class);
|
|
166
|
165
|
}
|
|
167
|
166
|
|
|
168
|
167
|
|
|
|
@@ -198,7 +197,7 @@ public class depotStyleServiceImpl implements depotStyleService {
|
|
198
|
197
|
/**
|
|
199
|
198
|
* restTemplate调用
|
|
200
|
199
|
*/
|
|
201
|
|
- String url = "http://localhost:9022/recPublish/sendMessage";//
|
|
|
200
|
+ //String url = "http://localhost:9022/recPublish/sendMessage";//
|
|
202
|
201
|
// 发送post请求,并打印结果,以String类型接收响应结果JSON字符串
|
|
203
|
202
|
MultiValueMap<String, Object> sendMap = new LinkedMultiValueMap<>();
|
|
204
|
203
|
//Map<String, Object> sendMap = new HashMap<String, Object>();
|
|
|
@@ -214,7 +213,7 @@ public class depotStyleServiceImpl implements depotStyleService {
|
|
214
|
213
|
sendMap.add("tableName", tableName);
|
|
215
|
214
|
sendMap.add("orgId",orgId);
|
|
216
|
215
|
|
|
217
|
|
- String result = (String) restTemplate.postForObject(url, sendMap, String.class);
|
|
|
216
|
+ String result = (String) restTemplate.postForObject(jsgjjsjUrl, sendMap, String.class);
|
|
218
|
217
|
}
|
|
219
|
218
|
|
|
220
|
219
|
}
|