This commit is contained in:
2025-10-17 13:59:14 +08:00
parent 237b1f3b88
commit a095f7dc73

View File

@@ -239,13 +239,15 @@ public class MkBirthdayGiftServiceImpl extends ServiceImpl<MkBirthdayGiftMapper,
return null;
}
ShopUser shopUser = shopUserService.getOne(new QueryWrapper()
.eq(ShopUser::getUserId, userId).eq(ShopUser::getMainShopId, shopId).eq(ShopUser::getBirthDayRemind, 0));
.eq(ShopUser::getUserId, userId).isNotNull(ShopUser::getBirthDay)
.eq(ShopUser::getMainShopId, shopId).eq(ShopUser::getBirthDayRemind, 0));
if (shopUser == null) {
return null;
}
if (StrUtil.isBlank(birthdayGift.getConfigList())) {
return null;
}
try {
//获取当天日期
LocalDate current = DateUtil.date().toLocalDateTime().toLocalDate();
// 解析用户生日(仅取月日)
@@ -289,6 +291,10 @@ public class MkBirthdayGiftServiceImpl extends ServiceImpl<MkBirthdayGiftMapper,
}
}
}
} catch (Exception e) {
log.error("获取生日礼包配置失败, shopUser: {}", shopUser, e);
return null;
}
return null;
}