|
@@ -52,6 +52,7 @@ public class MztbController { |
|
|
log.info("请求携带需要更新的机构数据为空!"); |
|
|
log.info("请求携带需要更新的机构数据为空!"); |
|
|
return R.success(); |
|
|
return R.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
log.debug("获取到数据:"+updatePartyList.size()+"条,准备处理机构数据。。。。。"); |
|
|
|
|
|
|
|
|
// 批量处理的数据 |
|
|
// 批量处理的数据 |
|
|
List<PartyInfo> partysUpdateList = new ArrayList<>(); |
|
|
List<PartyInfo> partysUpdateList = new ArrayList<>(); |
|
@@ -178,6 +179,7 @@ public class MztbController { |
|
|
userStatuList.removeAll(userStatuListExist); |
|
|
userStatuList.removeAll(userStatuListExist); |
|
|
ptIdList.removeAll(ptIdListExist); |
|
|
ptIdList.removeAll(ptIdListExist); |
|
|
|
|
|
|
|
|
|
|
|
log.debug("数据构建完成,向数据库写入数据"); |
|
|
instance.doTrans(() -> { |
|
|
instance.doTrans(() -> { |
|
|
// 处理新增或者修改的数据 |
|
|
// 处理新增或者修改的数据 |
|
|
instance.findDao(PartyInfo.class).batchInsertEntity(partysInsertList); |
|
|
instance.findDao(PartyInfo.class).batchInsertEntity(partysInsertList); |
|
@@ -188,6 +190,7 @@ public class MztbController { |
|
|
instance.findDao(Dept.class).batchInsertEntity(deptList); |
|
|
instance.findDao(Dept.class).batchInsertEntity(deptList); |
|
|
instance.findDao(UserRole.class).batchInsertEntity(userRoleList); |
|
|
instance.findDao(UserRole.class).batchInsertEntity(userRoleList); |
|
|
instance.findDao(UserStatu.class).batchInsertEntity(userStatuList); |
|
|
instance.findDao(UserStatu.class).batchInsertEntity(userStatuList); |
|
|
|
|
|
log.debug("数据写入完成-----"); |
|
|
|
|
|
|
|
|
// 将新增的机构 加入角色组的 机构字段 |
|
|
// 将新增的机构 加入角色组的 机构字段 |
|
|
if (ptIdList.size() > 0) { |
|
|
if (ptIdList.size() > 0) { |
|
@@ -202,6 +205,7 @@ public class MztbController { |
|
|
UserRoleCache.getInstance().putList(userRoleList); |
|
|
UserRoleCache.getInstance().putList(userRoleList); |
|
|
UserStatuCache.getInstance().putList(userStatuList); |
|
|
UserStatuCache.getInstance().putList(userStatuList); |
|
|
RoleGroupCache.getInstance().refresh(); |
|
|
RoleGroupCache.getInstance().refresh(); |
|
|
|
|
|
log.debug("机构缓存刷新完成!"); |
|
|
}); |
|
|
}); |
|
|
return R.success(); |
|
|
return R.success(); |
|
|
} |
|
|
} |
|
|