diff --git a/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/ShopCouponServiceImpl.java b/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/ShopCouponServiceImpl.java index 85afcf935..aaa35ab2f 100644 --- a/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/ShopCouponServiceImpl.java +++ b/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/ShopCouponServiceImpl.java @@ -244,7 +244,10 @@ public class ShopCouponServiceImpl extends ServiceImpl find(Long userId, String name, Long shopId, Integer status) { Page page = PageUtil.buildPage(); - Long mainShopId = shopInfoService.getMainIdByShopId(shopId); + Long mainShopId = null; + if (shopId != null) { + mainShopId = shopInfoService.getMainIdByShopId(shopId); + } List shopUserIds = shopUserService.listAs(new QueryWrapper().eq(ShopUser::getUserId, userId) .eq(ShopUser::getMainShopId, mainShopId) .select(ShopUser::getId), Long.class);