【同步】BOOT 和 CLOUD 的功能(所有)

This commit is contained in:
YunaiV
2024-12-27 22:19:09 +08:00
parent c322c53b45
commit e5c036a60d
43 changed files with 338 additions and 95 deletions

View File

@@ -152,7 +152,7 @@ public class CouponServiceImpl implements CouponService {
findAndThen(userCouponIdsMap, userId, couponIds::addAll);
}
} catch (Exception e) {
log.error("[takeCouponsByAdmin][coupon({}) 优惠券发放失败]", entry, e);
log.error("[takeCouponsByAdmin][coupon({}) 优惠券发放失败 userId({})]", entry, userId, e);
}
}
return couponIds;
@@ -270,7 +270,7 @@ public class CouponServiceImpl implements CouponService {
}
// 校验剩余数量
if (ObjUtil.notEqual(couponTemplate.getTakeLimitCount(), CouponTemplateDO.TIME_LIMIT_COUNT_MAX) // 非不限制
&& couponTemplate.getTakeCount() + userIds.size() > couponTemplate.getTotalCount()) {
&& couponTemplate.getTakeCount() + userIds.size() > couponTemplate.getTotalCount()) {
throw exception(COUPON_TEMPLATE_NOT_ENOUGH);
}
// 校验"固定日期"的有效期类型是否过期