员工权限报错修复
This commit is contained in:
@@ -20,7 +20,9 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 店铺员工 服务层实现。
|
||||
@@ -121,7 +123,7 @@ public class ShopStaffServiceImpl extends ServiceImpl<ShopStaffMapper, ShopStaff
|
||||
}
|
||||
|
||||
private void addPermission(ShopStaff shopStaff, List<Long> shopPermissionIds) {
|
||||
long count = shopPermissionService.queryChain().in(ShopPermission::getId, shopPermissionIds).count();
|
||||
long count = shopPermissionService.queryChain().in(ShopPermission::getId, new HashSet<>(shopPermissionIds)).count();
|
||||
if (count != shopPermissionIds.size()) {
|
||||
throw new ApiNotPrintException("存在不存在的权限");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user