生日有礼发券修复

This commit is contained in:
张松
2025-11-14 15:56:19 +08:00
parent 54ef1906ef
commit ec71721c97
3 changed files with 31 additions and 3 deletions

View File

@@ -204,7 +204,7 @@ public class MkBirthdayGiftServiceImpl extends ServiceImpl<MkBirthdayGiftMapper,
// 优惠券信息
if (config.getCouponInfoList() != null && !config.getCouponInfoList().isEmpty()) {
Map<Long, ShopCoupon> couponMap = shopCouponService.list(new QueryWrapper().eq(ShopCoupon::getId, config.getCouponInfoList()
Map<Long, ShopCoupon> couponMap = shopCouponService.list(new QueryWrapper().in(ShopCoupon::getId, config.getCouponInfoList()
.stream().map(CouponInfoDTO::getId).toList())).stream().collect(Collectors.toMap(ShopCoupon::getId, item -> item));
config.getCouponInfoList().forEach(couponInfo -> {
ShopCoupon shopCoupon = couponMap.get(couponInfo.getId());