浏览代码

1.新增返回结果log日志

WoNiu 5 年之前
父节点
当前提交
4e8aeef696
共有 1 个文件被更改,包括 21 次插入3 次删除
  1. 21 3
      src/main/java/com/galaxis/manatee/manager/impl/DefaultChuanyunManagerImpl.java

+ 21 - 3
src/main/java/com/galaxis/manatee/manager/impl/DefaultChuanyunManagerImpl.java

@@ -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;
     }
 }