shopID问题

This commit is contained in:
2025-12-05 18:18:57 +08:00
parent 5434f63ee4
commit 19d9877ba8

View File

@@ -244,7 +244,10 @@ public class ShopCouponServiceImpl extends ServiceImpl<ShopCouponMapper, ShopCou
@Override
public Page<UserCouponVO> find(Long userId, String name, Long shopId, Integer status) {
Page<Object> page = PageUtil.buildPage();
Long mainShopId = shopInfoService.getMainIdByShopId(shopId);
Long mainShopId = null;
if (shopId != null) {
mainShopId = shopInfoService.getMainIdByShopId(shopId);
}
List<Long> shopUserIds = shopUserService.listAs(new QueryWrapper().eq(ShopUser::getUserId, userId)
.eq(ShopUser::getMainShopId, mainShopId)
.select(ShopUser::getId), Long.class);