麻将胡了
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@ public class VipFlowRewardResponse {
|
|||||||
/** 昨日游戏流水 */
|
/** 昨日游戏流水 */
|
||||||
private String yesterdayAmount;
|
private String yesterdayAmount;
|
||||||
|
|
||||||
/** 已领奖励(昨日VIP流水返利实际发放金额) */
|
/** 已领奖励(昨日流水对应的返利,由今天 00:10 的 VIP流水返利发放定时任务入账) */
|
||||||
private String yesterdayReward;
|
private String yesterdayReward;
|
||||||
|
|
||||||
/** VIP等级列表(精简:仅名称、达标金额、流水返利百分比) */
|
/** VIP等级列表(精简:仅名称、达标金额、流水返利百分比) */
|
||||||
|
|||||||
+8
-8
@@ -548,12 +548,12 @@ public class ApiBonusServiceImpl implements ApiBonusService {
|
|||||||
.reduce(BigDecimal.ZERO, BigDecimal::add).abs();
|
.reduce(BigDecimal.ZERO, BigDecimal::add).abs();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 已领奖励:截至昨日 23:59:59 累计领取的 VIP 流水返利总额
|
// 昨日返利:由每日 00:10 的 VipFlowRebateTask 按昨日流水发放,记录落在今天,故取今日窗口
|
||||||
LocalDateTime todayStart = LocalDate.now().atStartOfDay();
|
LocalDateTime todayStart = LocalDate.now().atStartOfDay();
|
||||||
var yesterdayRewardRecords = new LambdaQueryChainWrapper<>(userBlendErcashMapper)
|
var yesterdayRewardRecords = new LambdaQueryChainWrapper<>(userBlendErcashMapper)
|
||||||
.eq(TtUserBlendErcash::getUserId, ttUser.getUserId())
|
.eq(TtUserBlendErcash::getUserId, ttUser.getUserId())
|
||||||
.eq(TtUserBlendErcash::getSource, TtAccountRecordSource.VIP_CONSUME_AWARD.getCode())
|
.eq(TtUserBlendErcash::getSource, TtAccountRecordSource.VIP_CONSUME_AWARD.getCode())
|
||||||
.lt(TtUserBlendErcash::getCreateTime, todayStart)
|
.ge(TtUserBlendErcash::getCreateTime, todayStart)
|
||||||
.list();
|
.list();
|
||||||
BigDecimal yesterdayRewardTotal = CollectionUtils.isEmpty(yesterdayRewardRecords)
|
BigDecimal yesterdayRewardTotal = CollectionUtils.isEmpty(yesterdayRewardRecords)
|
||||||
? BigDecimal.ZERO
|
? BigDecimal.ZERO
|
||||||
@@ -610,19 +610,19 @@ public class ApiBonusServiceImpl implements ApiBonusService {
|
|||||||
long threshold = lv.getRechargeThreshold() != null
|
long threshold = lv.getRechargeThreshold() != null
|
||||||
? lv.getRechargeThreshold().setScale(0, RoundingMode.CEILING).longValue() : 0L;
|
? lv.getRechargeThreshold().setScale(0, RoundingMode.CEILING).longValue() : 0L;
|
||||||
|
|
||||||
// 进度文本计算:所有等级都显示到下一级阈值的距离
|
// 进度文本:已达标的等级显示满条(x/x),未达标的显示当前经验/该级阈值
|
||||||
String lvProgress;
|
String lvProgress;
|
||||||
if (i == allLevels.size() - 1) {
|
if (i == allLevels.size() - 1) {
|
||||||
// 最后一级:显示满级状态
|
// 最后一级:显示满级状态
|
||||||
lvProgress = threshold + "/max";
|
lvProgress = threshold + "/max";
|
||||||
} else if (threshold <= 0) {
|
} else if (threshold <= 0) {
|
||||||
lvProgress = currentExp + "/0";
|
lvProgress = currentExp + "/0";
|
||||||
|
} else if (currentExp >= threshold) {
|
||||||
|
// 已达标:该级整条满
|
||||||
|
lvProgress = threshold + "/" + threshold;
|
||||||
} else {
|
} else {
|
||||||
// 显示当前经验/下一级阈值(即使当前等级已满)
|
// 未达标:当前经验 / 该级阈值
|
||||||
TtVipLevel nextLv = allLevels.get(i + 1);
|
lvProgress = currentExp + "/" + threshold;
|
||||||
long nextThreshold = nextLv.getRechargeThreshold() != null
|
|
||||||
? nextLv.getRechargeThreshold().setScale(0, RoundingMode.CEILING).longValue() : 0L;
|
|
||||||
lvProgress = currentExp + "/" + nextThreshold;
|
|
||||||
}
|
}
|
||||||
levelItems.add(VipFlowRewardResponse.VipLevelItem.builder()
|
levelItems.add(VipFlowRewardResponse.VipLevelItem.builder()
|
||||||
.name(lv.getName())
|
.name(lv.getName())
|
||||||
|
|||||||
Reference in New Issue
Block a user