|
@@ -494,11 +494,12 @@ public class CommonRatingServiceImpl extends ServiceImpl<CommonRatingMapper, Com
|
|
|
|
|
|
|
|
// 检查参与次数限制(每个活动单独计算)
|
|
// 检查参与次数限制(每个活动单独计算)
|
|
|
Integer limit = activity.getParticipationLimit();
|
|
Integer limit = activity.getParticipationLimit();
|
|
|
- if (limit != null && limit > 0) {
|
|
|
|
|
|
|
+ Integer couponQuantity = activity.getCouponQuantity();
|
|
|
|
|
+ if (limit != null && limit > 0 && couponQuantity != null && couponQuantity > 0) {
|
|
|
// 审核成功之前的评论不计算在参与次数中(只统计审核成功时间在活动审核时间之后的评论)
|
|
// 审核成功之前的评论不计算在参与次数中(只统计审核成功时间在活动审核时间之后的评论)
|
|
|
int passedCount = commonRatingMapper.countPassedGoodRatingsByUserAndStore(
|
|
int passedCount = commonRatingMapper.countPassedGoodRatingsByUserAndStore(
|
|
|
commonRating.getUserId(), businessId, activity.getAuditTime());
|
|
commonRating.getUserId(), businessId, activity.getAuditTime());
|
|
|
- if (passedCount > limit) {
|
|
|
|
|
|
|
+ if (passedCount > limit && passedCount > couponQuantity) {
|
|
|
log.info("CommonRatingService 好评送券跳过:超过运营活动参与次数 activityId={}, participation_limit={}, count={}, userId={}, storeId={}, activityStartTime={}",
|
|
log.info("CommonRatingService 好评送券跳过:超过运营活动参与次数 activityId={}, participation_limit={}, count={}, userId={}, storeId={}, activityStartTime={}",
|
|
|
activity.getId(), limit, passedCount, commonRating.getUserId(), businessId, activity.getStartTime());
|
|
activity.getId(), limit, passedCount, commonRating.getUserId(), businessId, activity.getStartTime());
|
|
|
continue; // 跳过该活动,继续处理下一个
|
|
continue; // 跳过该活动,继续处理下一个
|