Commit 45c586c7 authored by renjie's avatar renjie

分配店铺权限

parent 83c6d537
...@@ -263,7 +263,7 @@ public class ShopServiceImpl implements ShopService { ...@@ -263,7 +263,7 @@ public class ShopServiceImpl implements ShopService {
if (accounts == null || accounts.size() != users.size()) if (accounts == null || accounts.size() != users.size())
throw new ClientRequestException(AccountErrorCode.NAMENOTEXIST); throw new ClientRequestException(AccountErrorCode.NAMENOTEXIST);
for (Account ac : accounts) { for (Account ac : accounts) {
if (ac.getParent() == null) if (ac.getParent() == null || !ac.getParent().equals(username))
throw new ClientRequestException(AccountErrorCode.NOPERMISSION); throw new ClientRequestException(AccountErrorCode.NOPERMISSION);
} }
shops.stream().forEach(shop -> { shops.stream().forEach(shop -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment