修复consumer每日任务更新会员评价异常问题;优化生成每日秒杀活动
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user