mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update 修改框架中批量接口,改为原生mybatis执行foreach,改善性能
This commit is contained in:
@ -244,7 +244,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
||||
child.setAncestors(child.getAncestors().replaceFirst(oldAncestors, newAncestors));
|
||||
}
|
||||
if (children.size() > 0) {
|
||||
updateBatchById(children);
|
||||
baseMapper.updateDeptChildren(children);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,9 +240,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
||||
list.add(rm);
|
||||
}
|
||||
if (list.size() > 0) {
|
||||
for (SysRoleMenu sysRoleMenu : list) {
|
||||
rows += roleMenuMapper.insert(sysRoleMenu);
|
||||
}
|
||||
rows = roleMenuMapper.batchRoleMenu(list);
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
@ -263,9 +261,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
||||
list.add(rd);
|
||||
}
|
||||
if (list.size() > 0) {
|
||||
for (SysRoleDept sysRoleDept : list) {
|
||||
rows += roleDeptMapper.insert(sysRoleDept);
|
||||
}
|
||||
rows = roleDeptMapper.batchRoleDept(list);
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
@ -311,9 +311,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
list.add(ur);
|
||||
}
|
||||
if (list.size() > 0) {
|
||||
for (SysUserRole sysUserRole : list) {
|
||||
userRoleMapper.insert(sysUserRole);
|
||||
}
|
||||
userRoleMapper.batchUserRole(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -335,9 +333,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
list.add(up);
|
||||
}
|
||||
if (list.size() > 0) {
|
||||
for (SysUserPost sysUserPost : list) {
|
||||
userPostMapper.insert(sysUserPost);
|
||||
}
|
||||
userPostMapper.batchUserPost(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user