|
|
@@ -1,6 +1,6 @@
|
|
|
package com.kym.service.impl;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
|
import com.kym.common.utils.CommUtil;
|
|
|
import com.kym.entity.Role;
|
|
|
@@ -50,10 +50,12 @@ public class RoleServiceImpl extends MPJBaseServiceImpl<RoleMapper, Role> implem
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@Override
|
|
|
public void saveList(List<Role> roleList) {
|
|
|
- roleList.forEach(role -> lambdaUpdate()
|
|
|
- .eq(Role::getId, role.getId())
|
|
|
- .set(Role::getPermissions, role.getPermissions())
|
|
|
- .update());
|
|
|
+ roleList.forEach(role -> {
|
|
|
+ LambdaUpdateWrapper<Role> wrapper = new LambdaUpdateWrapper<>();
|
|
|
+ wrapper.eq(Role::getId, role.getId())
|
|
|
+ .set(Role::getPermissions, role.getPermissions());
|
|
|
+ baseMapper.update(null, wrapper);
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
@Override
|