|
|
@@ -9,6 +9,7 @@ import com.chinaitop.depot.utils.ParameterUtil;
|
|
9
|
9
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
10
|
10
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
11
|
11
|
|
|
|
12
|
+import org.springframework.beans.factory.annotation.Value;
|
|
12
|
13
|
import org.springframework.context.annotation.Bean;
|
|
13
|
14
|
import org.springframework.stereotype.Service;
|
|
14
|
15
|
import org.springframework.util.LinkedMultiValueMap;
|
|
|
@@ -31,11 +32,9 @@ public class StorageSafeManageServiceImpl implements StorageSafeManageService {
|
|
31
|
32
|
@Resource
|
|
32
|
33
|
private RestTemplate restTemplate;
|
|
33
|
34
|
|
|
34
|
|
- @Bean
|
|
35
|
|
- public RestTemplate restTemplate() {
|
|
36
|
|
- return new RestTemplate();
|
|
37
|
|
- }
|
|
38
|
|
-
|
|
|
35
|
+ @Value("${jsgjjsjUrl}")
|
|
|
36
|
+ private String jsgjjsjUrl;
|
|
|
37
|
+
|
|
39
|
38
|
@Override
|
|
40
|
39
|
public List<StorageSafeManageWithBLOBs> findbyConditions(Integer orgId, Integer fxlx, Integer fxfj) throws Exception {
|
|
41
|
40
|
|
|
|
@@ -145,7 +144,7 @@ public class StorageSafeManageServiceImpl implements StorageSafeManageService {
|
|
145
|
144
|
/**
|
|
146
|
145
|
* restTemplate调用
|
|
147
|
146
|
*/
|
|
148
|
|
- String url = "http://localhost:9022/recPublish/sendMessage";//
|
|
|
147
|
+ //String url = "http://localhost:9022/recPublish/sendMessage";//
|
|
149
|
148
|
// 发送post请求,并打印结果,以String类型接收响应结果JSON字符串
|
|
150
|
149
|
MultiValueMap<String, Object> sendMap = new LinkedMultiValueMap<>();
|
|
151
|
150
|
//Map<String, Object> sendMap = new HashMap<String, Object>();
|
|
|
@@ -161,6 +160,6 @@ public class StorageSafeManageServiceImpl implements StorageSafeManageService {
|
|
161
|
160
|
sendMap.add("tableName", tableName);
|
|
162
|
161
|
sendMap.add("orgId",orgId);
|
|
163
|
162
|
|
|
164
|
|
- String result = (String) restTemplate.postForObject(url, sendMap, String.class);
|
|
|
163
|
+ String result = (String) restTemplate.postForObject(jsgjjsjUrl, sendMap, String.class);
|
|
165
|
164
|
}
|
|
166
|
165
|
}
|