|
|
@@ -1,5 +1,6 @@
|
|
|
package com.xunmei.sync.controller;
|
|
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
import com.xunmei.common.core.web.domain.AjaxResult;
|
|
|
import com.xunmei.sync.dto.fjnxsync.SyncFileDto;
|
|
|
import com.xunmei.sync.dto.fjnxsync.SyncResponseDto;
|
|
|
@@ -40,7 +41,9 @@ class FjnxSyncController {
|
|
|
@ResponseBody
|
|
|
AjaxResult SyncOrg() throws IOException {
|
|
|
try {
|
|
|
+ log.info("开始同步机构数据:{}", DateUtil.date());
|
|
|
String resultMsg= ifjnxSyncService.SyncOrgInfo();
|
|
|
+ log.info("同步机构结束数据:{}", DateUtil.date());
|
|
|
if(StringUtil.isNullOrEmpty(resultMsg)){
|
|
|
return AjaxResult.success("同步成功");
|
|
|
}
|
|
|
@@ -50,6 +53,7 @@ class FjnxSyncController {
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
+ log.error("同步机构数据失败,失败原因:{},{}",e.getMessage(),e.getStackTrace());
|
|
|
return AjaxResult.error("机构同步失败" + e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
@@ -59,7 +63,9 @@ class FjnxSyncController {
|
|
|
AjaxResult SyncUser() throws Exception {
|
|
|
|
|
|
try {
|
|
|
+ log.info("开始同步人员数据:{}", DateUtil.date());
|
|
|
String resultMsg=ifjnxSyncService.SyncUserInfo();
|
|
|
+ log.info("同步人员结束数据:{}", DateUtil.date());
|
|
|
if(StringUtil.isNullOrEmpty(resultMsg)){
|
|
|
return AjaxResult.success("同步成功");
|
|
|
}
|
|
|
@@ -68,6 +74,7 @@ class FjnxSyncController {
|
|
|
return AjaxResult.error("同步失败:"+resultMsg);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
+ log.error("人员同步失败,失败原因:{},{}",e.getMessage(),e.getStackTrace());
|
|
|
return AjaxResult.error("人员同步失败" + e.getMessage());
|
|
|
}
|
|
|
}
|