|
|
@@ -7,6 +7,7 @@ import java.util.Map;
|
|
7
|
7
|
import javax.annotation.Resource;
|
|
8
|
8
|
|
|
9
|
9
|
import org.apache.commons.lang3.StringUtils;
|
|
|
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;
|
|
|
@@ -32,10 +33,8 @@ public class BusinessCustomerServiceImpl implements BusinessCustomerService {
|
|
32
|
33
|
@Resource
|
|
33
|
34
|
private RestTemplate restTemplate;
|
|
34
|
35
|
|
|
35
|
|
- @Bean
|
|
36
|
|
- public RestTemplate restTemplate() {
|
|
37
|
|
- return new RestTemplate();
|
|
38
|
|
- }
|
|
|
36
|
+ @Value("${jsgjjsjUrl}")
|
|
|
37
|
+ private String jsgjjsjUrl;
|
|
39
|
38
|
|
|
40
|
39
|
@Override
|
|
41
|
40
|
public List<BusinessCustomer> queryByExample(BusinessCustomerExample example) {
|
|
|
@@ -208,7 +207,7 @@ public class BusinessCustomerServiceImpl implements BusinessCustomerService {
|
|
208
|
207
|
/**
|
|
209
|
208
|
* restTemplate调用
|
|
210
|
209
|
*/
|
|
211
|
|
- String url = "http://localhost:9022/recPublish/sendMessage";//
|
|
|
210
|
+ //String url = "http://localhost:9022/recPublish/sendMessage";//
|
|
212
|
211
|
// 发送post请求,并打印结果,以String类型接收响应结果JSON字符串
|
|
213
|
212
|
MultiValueMap<String, Object> sendMap = new LinkedMultiValueMap<>();
|
|
214
|
213
|
//Map<String, Object> sendMap = new HashMap<String, Object>();
|
|
|
@@ -224,7 +223,7 @@ public class BusinessCustomerServiceImpl implements BusinessCustomerService {
|
|
224
|
223
|
sendMap.add("tableName", tableName);
|
|
225
|
224
|
sendMap.add("orgId",orgId);
|
|
226
|
225
|
|
|
227
|
|
- String result = (String) restTemplate.postForObject(url, sendMap, String.class);
|
|
|
226
|
+ String result = (String) restTemplate.postForObject(jsgjjsjUrl, sendMap, String.class);
|
|
228
|
227
|
}
|
|
229
|
228
|
|
|
230
|
229
|
}
|