Commit e9d43f7f authored by shenxin's avatar shenxin

加入新津

parent 821798c8
...@@ -44,6 +44,9 @@ public class InformationServiceImpl extends AbstractCRUDServiceImpl<InformationD ...@@ -44,6 +44,9 @@ public class InformationServiceImpl extends AbstractCRUDServiceImpl<InformationD
@Value("${upload.pageSize}") @Value("${upload.pageSize}")
Integer pageSize; Integer pageSize;
@Value("${upload.AppKey}")
String AppKey;
@Resource @Resource
private InformationService informationService; private InformationService informationService;
...@@ -61,11 +64,6 @@ public class InformationServiceImpl extends AbstractCRUDServiceImpl<InformationD ...@@ -61,11 +64,6 @@ public class InformationServiceImpl extends AbstractCRUDServiceImpl<InformationD
return; return;
} }
List<InformationEntity> entities = informationEntities.parallelStream().map(e -> { List<InformationEntity> entities = informationEntities.parallelStream().map(e -> {
// try {
// Thread.sleep(applyAndAcceptSleep);
// } catch (InterruptedException e1) {
// e1.printStackTrace();
// }
//组装参数 //组装参数
HashMap<String, Object> stringObjectHashMap = assemblyParameters(e); HashMap<String, Object> stringObjectHashMap = assemblyParameters(e);
if(stringObjectHashMap == null){ if(stringObjectHashMap == null){
...@@ -81,9 +79,9 @@ public class InformationServiceImpl extends AbstractCRUDServiceImpl<InformationD ...@@ -81,9 +79,9 @@ public class InformationServiceImpl extends AbstractCRUDServiceImpl<InformationD
e.setAcceptPhone(map.get("receiveuserphone")); e.setAcceptPhone(map.get("receiveuserphone"));
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("jsonData", JSONObject.toJSONString(stringObjectHashMap)); params.put("jsonData", JSONObject.toJSONString(stringObjectHashMap));
HttpRequest key = HttpUtil.createPost("https://10.1.235.51:4433/gateway/api/1/wllz/bjsqtjbsl/zs") HttpRequest key = HttpUtil.createPost("https://10.1.235.51:4433/gateway/api/1/wllz/bjsqtjbsl/zs")//蓉易办
// HttpRequest key = HttpUtil.createPost("http://192.168.0.222:17011/m/supplement/test") // HttpRequest key = HttpUtil.createPost("http://192.168.0.222:17011/m/supplement/test")//本地测试
.header("AppKey", "743109085582327808") .header("AppKey", AppKey)
.header("Content-Type", "application/x-www-form-urlencoded;charset=utf-8").form(params); .header("Content-Type", "application/x-www-form-urlencoded;charset=utf-8").form(params);
HttpResponse appKey = key.execute().charset("utf-8"); HttpResponse appKey = key.execute().charset("utf-8");
JSONObject jsonObject = JSONObject.parseObject(appKey.body()); JSONObject jsonObject = JSONObject.parseObject(appKey.body());
...@@ -316,19 +314,14 @@ public class InformationServiceImpl extends AbstractCRUDServiceImpl<InformationD ...@@ -316,19 +314,14 @@ public class InformationServiceImpl extends AbstractCRUDServiceImpl<InformationD
return; return;
} }
List<InformationEntity> collect = informationEntities.parallelStream().map(e -> { List<InformationEntity> collect = informationEntities.parallelStream().map(e -> {
// try {
// Thread.sleep(applyAndAcceptSleep);
// } catch (InterruptedException e1) {
// e1.printStackTrace();
// }
//组装参数 //组装参数
HashMap<String, Object> stringObjectHashMap = assemblyParametersLink(e); HashMap<String, Object> stringObjectHashMap = assemblyParametersLink(e);
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("jsonData", JSONObject.toJSONString(stringObjectHashMap)); params.put("jsonData", JSONObject.toJSONString(stringObjectHashMap));
String appKey = HttpUtil String appKey = HttpUtil
.createPost("https://10.1.235.51:4433/gateway/api/1/wllz/bjhjgcsjts/zs").form(params) .createPost("https://10.1.235.51:4433/gateway/api/1/wllz/bjhjgcsjts/zs").form(params)//蓉易办
// .createPost("http://192.168.0.222:17011/m/supplement/test").form(params) // .createPost("http://192.168.0.222:17011/m/supplement/test").form(params)//测试
.header("AppKey", "743109085582327808") .header("AppKey", AppKey)
.header("Content-Type", "application/x-www-form-urlencoded;charset=utf-8") .header("Content-Type", "application/x-www-form-urlencoded;charset=utf-8")
.execute() .execute()
.charset("utf-8") .charset("utf-8")
......
...@@ -18,12 +18,15 @@ spring: ...@@ -18,12 +18,15 @@ spring:
nacos: nacos:
# Nacos 作为注册中心的配置项,对应 NacosDiscoveryProperties 配置类 # Nacos 作为注册中心的配置项,对应 NacosDiscoveryProperties 配置类
discovery: discovery:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址 # server-addr: 127.0.0.1:8848 # Nacos 金堂服务器地址
server-addr: 192.168.0.191:8848 # Nacos 新津服务器地址
group: DEFAULT_GROUP group: DEFAULT_GROUP
#公司本机 #公司本机
# namespace: develop # namespace: develop
#金堂服务器 #金堂服务器
namespace: 718d1c5b-0e1f-42b7-936a-619e28bfa4c4 # namespace: 718d1c5b-0e1f-42b7-936a-619e28bfa4c4
#新津服务器
namespace: 322ede00-337f-4da7-acf0-b81855b580e1
config: config:
server-addr: ${spring.cloud.nacos.discovery.server-addr} # Nacos 服务器地址 server-addr: ${spring.cloud.nacos.discovery.server-addr} # Nacos 服务器地址
group: ${spring.cloud.nacos.discovery.group} group: ${spring.cloud.nacos.discovery.group}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment