VIP 送金币增加COUPON_EXCHANGE 类型
This commit is contained in:
parent
827741ae36
commit
320d1c3ad6
@ -338,12 +338,12 @@ public class DailyTask {
|
||||
|
||||
// 分离购买记录和扣除记录
|
||||
List<RunningWaterUserProps> purchasingRecords = allRecords.stream()
|
||||
.filter(record -> "PURCHASING_GOLD_PROPS".equals(record.getOrigin()))
|
||||
.filter(DailyTask::validType)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 检查非PURCHASING_GOLD_PROPS类型的扣除天数记录
|
||||
List<RunningWaterUserProps> deductionRecords = allRecords.stream()
|
||||
.filter(record -> !"PURCHASING_GOLD_PROPS".equals(record.getOrigin()) && record.getDays() != null && record.getDays() < 0)
|
||||
.filter(record -> !validType(record) && record.getDays() != null && record.getDays() < 0)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (CollectionUtils.isEmpty(purchasingRecords)) {
|
||||
@ -373,6 +373,10 @@ public class DailyTask {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean validType(RunningWaterUserProps record) {
|
||||
return Arrays.asList("COUPON_EXCHANGE", "PURCHASING_GOLD_PROPS").contains(record.getOrigin());
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算用户的有效期截止时间
|
||||
* 根据购买记录和扣除记录,结合时间顺序累计计算有效期
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user