Commit 54ea7d60 authored by renjie's avatar renjie

bug

parent 18b1afde
...@@ -240,7 +240,7 @@ public class ShopServiceImpl implements ShopService { ...@@ -240,7 +240,7 @@ public class ShopServiceImpl implements ShopService {
} }
UserShop userShop = userShopRepository.findByUsernameAndShopId(username, shopId); UserShop userShop = userShopRepository.findByUsernameAndShopId(username, shopId);
Group group = groupRepository.findById(groupId).orElse(null); Group group = groupRepository.findById(groupId).orElse(null);
if (userShop == null || (!group.getId().equals("-1") && !group.getOwner().equals(username))) { if (userShop == null || (!group.getId().equals("-1") && group.getOwner() != null && !group.getOwner().equals(username))) {
throw new ClientRequestException(AccountErrorCode.NOPERMISSION); throw new ClientRequestException(AccountErrorCode.NOPERMISSION);
} }
Shop shop = shopRepository.findById(shopId).orElse(null); Shop shop = shopRepository.findById(shopId).orElse(null);
......
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