默认初始化页面权限修改
This commit is contained in:
parent
6e815f90ec
commit
6362581516
|
|
@ -102,14 +102,16 @@ public class ShopStaffServiceImpl extends ServiceImpl<ShopStaffMapper, ShopStaff
|
|||
BeanUtil.copyProperties(shopStaffEditDTO, shopStaff);
|
||||
updateById(shopStaff);
|
||||
|
||||
if (shopStaffEditDTO.getShopPermissionIds() != null && !shopStaffEditDTO.getShopPermissionIds().isEmpty()) {
|
||||
if (shopStaffEditDTO.getShopPermissionIds() != null ) {
|
||||
shopStaffPermissionService.updateChain().eq(ShopStaffPermission::getStaffId, shopStaff.getId())
|
||||
.eq(ShopStaffPermission::getShopId, StpKit.USER.getShopId()).eq(ShopStaffPermission::getUserId, shopStaff.getId()).remove();
|
||||
// 权限添加
|
||||
addPermission(shopStaff, shopStaffEditDTO.getShopPermissionIds());
|
||||
if (!shopStaffEditDTO.getShopPermissionIds().isEmpty()) {
|
||||
addPermission(shopStaff, shopStaffEditDTO.getShopPermissionIds());
|
||||
}
|
||||
}
|
||||
|
||||
if (shopStaffEditDTO.getPagePathIdList() != null && !shopStaffEditDTO.getPagePathIdList().isEmpty()) {
|
||||
if (shopStaffEditDTO.getPagePathIdList() != null) {
|
||||
PagePathPermissionAddDTO pagePathPermissionAddDTO = new PagePathPermissionAddDTO();
|
||||
pagePathPermissionAddDTO.setPagePathIdList(shopStaffEditDTO.getPagePathIdList());
|
||||
pagePathPermissionAddDTO.setStaffId(shopStaff.getId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue