fix: 修复BUG
This commit is contained in:
+4
-3
@@ -167,12 +167,13 @@ public class DataSyncServiceImpl implements IDataSyncService {
|
||||
});
|
||||
}
|
||||
List<TsInstitution> allTsInstitutionList = tsInstitutionService.list();
|
||||
for (String s : res) {
|
||||
List<TsInstitution> addTsInstitutionList = new ArrayList<>();
|
||||
List<TsInstitution> updateTsInstitutionList = new ArrayList<>();
|
||||
List<TsInstitution> delTsInstitutionList = new ArrayList<>();
|
||||
Set<String> syncAllIdList = new HashSet<>();
|
||||
for (String s : res) {
|
||||
JSONArray jsonArray = JSONArray.parseArray(JSONObject.parseObject(s.toString()).getString("results"));
|
||||
if(jsonArray!=null){
|
||||
jsonArray.forEach(object -> {
|
||||
JSONObject jsonObject = JSONObject.parseObject(object.toString());
|
||||
TsInstitution tsInstitution=new TsInstitution();
|
||||
@@ -191,6 +192,8 @@ public class DataSyncServiceImpl implements IDataSyncService {
|
||||
syncAllIdList.add(tsInstitution.getId());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//遍历出来需要删除的数据
|
||||
for(TsInstitution data :allTsInstitutionList){
|
||||
if(!syncAllIdList.contains(data.getId())){
|
||||
@@ -209,8 +212,6 @@ public class DataSyncServiceImpl implements IDataSyncService {
|
||||
if(!delTsInstitutionList.isEmpty()){
|
||||
tsInstitutionService.updateBatchById(delTsInstitutionList);
|
||||
}
|
||||
|
||||
}
|
||||
}catch(Exception e){
|
||||
logger.error(e.getMessage(),e);
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ public class SarMenuStandardNewServiceNewImpl extends ServiceImpl<SarMenuStandar
|
||||
if(sarMenuStandardNew.getDicId()!=null){
|
||||
queryWrapper.eq("DIC_ID", sarMenuStandardNew.getDicId());
|
||||
}
|
||||
queryWrapper.in(null!=access,"ID",access);
|
||||
queryWrapper.in(null!=access && !access.isEmpty(),"ID",access);
|
||||
queryWrapper.isNull("PARENT_ID");
|
||||
queryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
TsResources=dao.selectList(queryWrapper);
|
||||
|
||||
+1
-1
@@ -268,7 +268,7 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
}
|
||||
queryWrapper.isNull("PARENT_ID");
|
||||
queryWrapper.eq("VALID_FLAG","0");
|
||||
queryWrapper.in(null!=access,"ID",access);
|
||||
queryWrapper.in(null!=access && !access.isEmpty(),"ID",access);
|
||||
queryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
TsResources=dao.selectList(queryWrapper);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user