This commit is contained in:
2026-05-15 19:59:31 +08:00
parent f7e42c4824
commit 7c8d5fd24e
2 changed files with 16 additions and 6 deletions

View File

@@ -87,6 +87,7 @@
<div class="prize_img_wrap"> <div class="prize_img_wrap">
<img :src="getPrizeImg(item)" alt /> <img :src="getPrizeImg(item)" alt />
</div> </div>
<div class="prize_name" :title="item.ornamentName">{{ item.ornamentName }}</div>
</div> </div>
</div> </div>
<div class="view_all" @click="showAllPrizes = !showAllPrizes" v-if="rollPrizePool.length > 6"> <div class="view_all" @click="showAllPrizes = !showAllPrizes" v-if="rollPrizePool.length > 6">
@@ -271,6 +272,10 @@ export default {
console.log("参与人员", res); console.log("参与人员", res);
if (res.data.data.length < this.playersPage.size) { if (res.data.data.length < this.playersPage.size) {
this.playerListIsover = "暂无更多"; this.playerListIsover = "暂无更多";
} else {
// 自动加载下一页,直到所有参与者全部加载完
this.playersPage.page++;
this.RollPlayers();
} }
}); });
}, },

View File

@@ -162,10 +162,11 @@ public class TtRollServiceImpl extends ServiceImpl<TtRollMapper, TtRoll> impleme
TtRoll one = new LambdaQueryChainWrapper<>(baseMapper) TtRoll one = new LambdaQueryChainWrapper<>(baseMapper)
.eq(TtRoll::getId, ttRoll.getId()) .eq(TtRoll::getId, ttRoll.getId())
.eq(TtRoll::getRollStatus, 0)
.eq(TtRoll::getDelFlag, 0) .eq(TtRoll::getDelFlag, 0)
.one(); .one();
if (ObjectUtil.isEmpty(one)) return AjaxResult.error("不存在的roll房。");
Date oldEndTime = one.getEndTime(); Date oldEndTime = one.getEndTime();
// 此刻 // 此刻
@@ -175,12 +176,16 @@ public class TtRollServiceImpl extends ServiceImpl<TtRollMapper, TtRoll> impleme
long difference = endTime - c.getTimeInMillis(); long difference = endTime - c.getTimeInMillis();
if (difference < 10) return AjaxResult.error("开奖时间不能早于现在。"); if (difference < 10) return AjaxResult.error("开奖时间不能早于现在。");
// 临界区检查 // 已结束的房间可以随时修改时间,不受临界区限制
boolean isEnded = c.getTime().compareTo(oldEndTime) >= 0 || !"0".equals(one.getRollStatus());
if (!isEnded) {
// 临界区检查(仅对未结束的房间生效)
c.add(Calendar.MINUTE, 5); c.add(Calendar.MINUTE, 5);
long criticalTime = c.getTimeInMillis(); long criticalTime = c.getTimeInMillis();
if (criticalTime > oldEndTime.getTime()) { if (criticalTime > oldEndTime.getTime()) {
return AjaxResult.error("该roll房开奖时间已处于临界保护区【5分钟】内请勿修改开奖时间。"); return AjaxResult.error("该roll房开奖时间已处于临界保护区【5分钟】内请勿修改开奖时间。");
} }
}
baseMapper.updateById(ttRoll); baseMapper.updateById(ttRoll);
return AjaxResult.success(); return AjaxResult.success();