|
|
@@ -129,9 +129,9 @@ public class CardConsumeValidationContext {
|
|
|
context.discountMoney = bo.getConsumeMoney();
|
|
|
context.lastMeal = mealType;
|
|
|
context.currentTime = LocalDateTime.now();
|
|
|
- context.lastPayTime = CardDateUtils.toLocalDateTime(userCardVo.getLastPay());
|
|
|
+ context.lastPayTime = CardDateUtils.toLocalDateTime(bo.getConsumeDate());
|
|
|
|
|
|
- // 从缓存获取卡片数据
|
|
|
+ // 从缓存获取卡片限制数据
|
|
|
context.cardLimitedVo = RedisUtils.getCacheMapValue(CacheNames.T_XF_CARD_LIMITED, String.valueOf(userCardVo.getCardNo()));
|
|
|
// 如果缓存中没有则初始化为当天当餐
|
|
|
if (ObjectUtil.isEmpty(context.cardLimitedVo)) {
|
|
|
@@ -139,7 +139,7 @@ public class CardConsumeValidationContext {
|
|
|
}
|
|
|
LocalDateTime lastPayLimitLocalDt = CardDateUtils.toLocalDateTime(context.cardLimitedVo.getLastPay());
|
|
|
if (!lastPayLimitLocalDt.toLocalDate().isEqual(context.lastPayTime.toLocalDate())) {
|
|
|
- // 如果不是同天,初始化为当天
|
|
|
+ // 如果和消费时间不是同天,初始化为当天
|
|
|
initCardDayLimitedData(context.cardLimitedVo, Long.valueOf(context.lastMeal), context.consumeDate);
|
|
|
}else {
|
|
|
// 不是同一餐,更新到当前餐
|