From 01b2e7f040591f225016a54f47989e521a0bf8ab Mon Sep 17 00:00:00 2001 From: Odboy Date: Wed, 9 Apr 2025 19:22:36 +0800 Subject: [PATCH] =?UTF-8?q?upd:=20=E7=BC=96=E7=A0=81=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/odboy/application/system/mapper/RoleDeptMapper.java | 2 +- .../application/system/service/impl/RoleServiceImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cutejava/cutejava-system/src/main/java/cn/odboy/application/system/mapper/RoleDeptMapper.java b/cutejava/cutejava-system/src/main/java/cn/odboy/application/system/mapper/RoleDeptMapper.java index 040bf2a8..d59588b6 100644 --- a/cutejava/cutejava-system/src/main/java/cn/odboy/application/system/mapper/RoleDeptMapper.java +++ b/cutejava/cutejava-system/src/main/java/cn/odboy/application/system/mapper/RoleDeptMapper.java @@ -7,7 +7,7 @@ import java.util.Set; @Mapper public interface RoleDeptMapper { - void insertBatchWithRoleId(@Param("roleId") Long roleId, @Param("depts") Set depts); + void insertBatchWithRoleId(@Param("depts") Set depts, @Param("roleId") Long roleId); void deleteByRoleId(@Param("roleId") Long roleId); void deleteByRoleIds(@Param("roleIds") Set roleIds); } diff --git a/cutejava/cutejava-system/src/main/java/cn/odboy/application/system/service/impl/RoleServiceImpl.java b/cutejava/cutejava-system/src/main/java/cn/odboy/application/system/service/impl/RoleServiceImpl.java index 623c840a..773f4e0d 100644 --- a/cutejava/cutejava-system/src/main/java/cn/odboy/application/system/service/impl/RoleServiceImpl.java +++ b/cutejava/cutejava-system/src/main/java/cn/odboy/application/system/service/impl/RoleServiceImpl.java @@ -88,7 +88,7 @@ public class RoleServiceImpl extends ServiceImpl implements Ro save(BeanUtil.copyProperties(resources, Role.class)); // 判断是否有部门数据,若有,则需创建关联 if (CollectionUtil.isNotEmpty(resources.getDepts())) { - roleDeptMapper.insertBatchWithRoleId(resources.getId(), resources.getDepts()); + roleDeptMapper.insertBatchWithRoleId(resources.getDepts(), resources.getId()); } } @@ -111,7 +111,7 @@ public class RoleServiceImpl extends ServiceImpl implements Ro roleDeptMapper.deleteByRoleId(resources.getId()); // 判断是否有部门数据,若有,则需更新关联 if (CollectionUtil.isNotEmpty(resources.getDepts())) { - roleDeptMapper.insertBatchWithRoleId(resources.getId(), resources.getDepts()); + roleDeptMapper.insertBatchWithRoleId(resources.getDepts(), resources.getId()); } // 更新相关缓存 delCaches(role.getId(), null);