|
@@ -154,7 +154,13 @@ public class DefaultChuanyunManagerImpl implements ChuanYunManager {
|
|
|
httpHeaders.add("EngineSecret",ChuanYunConstant.ENGINE_SECRET);
|
|
|
HttpEntity<Save> httpEntity=new HttpEntity<>(save,httpHeaders);
|
|
|
ChuanyunSaveDTO chuanyunSaveResponse =new ChuanyunSaveDTO();
|
|
|
- return restTemplate.postForObject(ChuanYunConstant.CHUAN_YUN_INVOKE_URL,httpEntity, chuanyunSaveResponse.getClass());
|
|
|
+ chuanyunSaveResponse = restTemplate.postForObject(ChuanYunConstant.CHUAN_YUN_INVOKE_URL,httpEntity, chuanyunSaveResponse.getClass());
|
|
|
+ if (chuanyunSaveResponse.getSuccessful()) {
|
|
|
+ log.info("更新成功!");
|
|
|
+ }else {
|
|
|
+ log.info("更新失败!");
|
|
|
+ }
|
|
|
+ return chuanyunSaveResponse;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -184,7 +190,13 @@ public class DefaultChuanyunManagerImpl implements ChuanYunManager {
|
|
|
httpHeaders.add("EngineSecret",ChuanYunConstant.ENGINE_SECRET);
|
|
|
HttpEntity<SaveAll> httpEntity=new HttpEntity<>(saveAll,httpHeaders);
|
|
|
ChuanyunSaveAllDTO chuanyunSaveAllResponse =new ChuanyunSaveAllDTO();
|
|
|
- return restTemplate.postForObject(ChuanYunConstant.CHUAN_YUN_INVOKE_URL,httpEntity, chuanyunSaveAllResponse.getClass());
|
|
|
+ chuanyunSaveAllResponse = restTemplate.postForObject(ChuanYunConstant.CHUAN_YUN_INVOKE_URL,httpEntity, chuanyunSaveAllResponse.getClass());
|
|
|
+ if (chuanyunSaveAllResponse.getSuccessful()) {
|
|
|
+ log.info("批量新增成功!");
|
|
|
+ }else {
|
|
|
+ log.info("批量新增失败!");
|
|
|
+ }
|
|
|
+ return chuanyunSaveAllResponse;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -214,6 +226,12 @@ public class DefaultChuanyunManagerImpl implements ChuanYunManager {
|
|
|
httpHeaders.add("EngineSecret",ChuanYunConstant.ENGINE_SECRET);
|
|
|
HttpEntity<Update> httpEntity=new HttpEntity<>(update,httpHeaders);
|
|
|
ChuanyunSaveDTO chuanyunSaveResponse =new ChuanyunSaveDTO();
|
|
|
- return restTemplate.postForObject(ChuanYunConstant.CHUAN_YUN_INVOKE_URL,httpEntity, chuanyunSaveResponse.getClass());
|
|
|
+ chuanyunSaveResponse = restTemplate.postForObject(ChuanYunConstant.CHUAN_YUN_INVOKE_URL,httpEntity, chuanyunSaveResponse.getClass());
|
|
|
+ if (chuanyunSaveResponse.getSuccessful()) {
|
|
|
+ log.info("更新成功!");
|
|
|
+ }else {
|
|
|
+ log.info("更新失败!");
|
|
|
+ }
|
|
|
+ return chuanyunSaveResponse;
|
|
|
}
|
|
|
}
|