修复consumer每日任务更新会员评价异常问题;优化生成每日秒杀活动

This commit is contained in:
paulGao
2022-08-25 10:43:56 +08:00
parent cc95fa92e7
commit 558eea94e2
4 changed files with 9 additions and 13 deletions

View File

@@ -242,7 +242,7 @@ public class MemberEvaluationServiceImpl extends ServiceImpl<MemberEvaluationMap
}
//判断是否是当前会员的订单
if (!order.getMemberId().equals(UserContext.getCurrentUser().getId())) {
if (UserContext.getCurrentUser() != null && !order.getMemberId().equals(UserContext.getCurrentUser().getId())) {
throw new ServiceException(ResultCode.ORDER_NOT_USER);
}
}

View File

@@ -87,12 +87,8 @@ public class PromotionTools {
} else {
queryWrapper.ge(START_TIME_COLUMN, DateUtil.beginOfDay(startTime)).le(END_TIME_COLUMN, DateUtil.endOfDay(endTime));
}
if (storeId != null) {
queryWrapper.eq("store_id", storeId);
}
if (activityId != null) {
queryWrapper.ne("id", activityId);
}
queryWrapper.eq(CharSequenceUtil.isNotEmpty(storeId), "store_id", storeId);
queryWrapper.ne(CharSequenceUtil.isNotEmpty(activityId), "id", activityId);
queryWrapper.and(i -> i.or(queryPromotionStatus(PromotionsStatusEnum.NEW)).or(queryPromotionStatus(PromotionsStatusEnum.START)));
queryWrapper.eq("delete_flag", false);
return queryWrapper;