fix: 基础数据同步增加日志输出,对过程进行追踪
This commit is contained in:
@@ -28,7 +28,9 @@ public class ScheduledSync {
|
|||||||
|
|
||||||
@Async
|
@Async
|
||||||
public void syncSchedulingTasks() {
|
public void syncSchedulingTasks() {
|
||||||
|
log.info("======================================开始同步基础数据========================================");
|
||||||
iDataSyncService.orgDataSync(); //时间短
|
iDataSyncService.orgDataSync(); //时间短
|
||||||
iDataSyncService.dataSync(); //时间长
|
iDataSyncService.dataSync(); //时间长
|
||||||
|
log.info("======================================结束同步基础数据========================================");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-1
@@ -124,9 +124,11 @@ public class DataSyncServiceImpl implements IDataSyncService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!addUserList.isEmpty()){
|
if(!addUserList.isEmpty()){
|
||||||
|
logger.debug("本次新增的用户为:"+JSONObject.toJSONString(addUserList));
|
||||||
tsUserService.saveBatch(addUserList);
|
tsUserService.saveBatch(addUserList);
|
||||||
}
|
}
|
||||||
if(!upUserList.isEmpty()){
|
if(!upUserList.isEmpty()){
|
||||||
|
logger.debug("本次更新的用户为:"+JSONObject.toJSONString(upUserList));
|
||||||
tsUserService.updateBatchById(upUserList);
|
tsUserService.updateBatchById(upUserList);
|
||||||
}
|
}
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
@@ -189,15 +191,22 @@ public class DataSyncServiceImpl implements IDataSyncService {
|
|||||||
}
|
}
|
||||||
//需要新增的数据
|
//需要新增的数据
|
||||||
if(!addTsInstitutionList.isEmpty()){
|
if(!addTsInstitutionList.isEmpty()){
|
||||||
|
logger.debug("本次新增的组织机构为:"+JSONObject.toJSONString(addTsInstitutionList));
|
||||||
tsInstitutionService.saveBatch(addTsInstitutionList);
|
tsInstitutionService.saveBatch(addTsInstitutionList);
|
||||||
}
|
}
|
||||||
//需要更新的数据
|
//需要更新的数据
|
||||||
if(!updateTsInstitutionList.isEmpty()){
|
if(!updateTsInstitutionList.isEmpty()){
|
||||||
|
logger.debug("本次更新的组织机构为:"+JSONObject.toJSONString(updateTsInstitutionList));
|
||||||
tsInstitutionService.updateBatchById(updateTsInstitutionList);
|
tsInstitutionService.updateBatchById(updateTsInstitutionList);
|
||||||
}
|
}
|
||||||
//需要删除的数据
|
//需要删除的数据
|
||||||
if(!delTsInstitutionList.isEmpty()){
|
if(!delTsInstitutionList.isEmpty()){
|
||||||
tsInstitutionService.updateBatchById(delTsInstitutionList);
|
logger.debug("本次删除的组织机构为:"+JSONObject.toJSONString(delTsInstitutionList));
|
||||||
|
List<String> delIdList = new ArrayList<>();
|
||||||
|
for(TsInstitution data : delTsInstitutionList){
|
||||||
|
delIdList.add(data.getId());
|
||||||
|
}
|
||||||
|
tsInstitutionService.removeByIds(delIdList);
|
||||||
}
|
}
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
logger.error(e.getMessage(),e);
|
logger.error(e.getMessage(),e);
|
||||||
|
|||||||
Reference in New Issue
Block a user