员工修改报错修复

This commit is contained in:
张松 2025-02-19 10:26:12 +08:00
parent 684902769b
commit d8791107a6
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ public class ShopStaffServiceImpl extends ServiceImpl<ShopStaffMapper, ShopStaff
BeanUtil.copyProperties(shopStaffEditDTO, shopStaff);
updateById(shopStaff);
if (!shopStaffEditDTO.getShopPermissionIds().isEmpty()) {
if (shopStaffEditDTO.getShopPermissionIds() != null && !shopStaffEditDTO.getShopPermissionIds().isEmpty()) {
shopStaffPermissionService.updateChain().eq(ShopStaffPermission::getStaffId, shopStaff.getId())
.eq(ShopStaffPermission::getShopId, StpKit.USER.getShopId()).eq(ShopStaffPermission::getUserId, shopStaff.getId()).remove();
// 权限添加