Skip to content

Commit

Permalink
抽奖不再判断结束时间
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleFish-233 committed Jul 26, 2023
1 parent aebb9ea commit 46e63fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -716,7 +716,7 @@ public async Task<ActionResult<Result>> ParticipateInLottery(ParticipateInLotter
public async Task<ActionResult<Result>> DrawLotteryAsync(ManualLotteryModel model)
{
var time = DateTime.Now.ToCstTime();
if (await _lotteryRepository.GetAll().AnyAsync(s => s.Id == model.LotteryId && s.EndTime < time) == false)
if (await _lotteryRepository.GetAll().AnyAsync(s => s.Id == model.LotteryId /*&& s.EndTime < time*/) == false)
{
return new Result { Successful = false, Error = "未找到该抽奖或抽奖未结束" };
}
Expand Down
Expand Up @@ -4,7 +4,7 @@


<div style="display: flex; justify-content: center;">
@if (Model.Type == LotteryType.Manual && Model.IsEnd == false&& Model.EndTime < DateTime.Now.ToCstTime())
@if (Model.Type == LotteryType.Manual && Model.IsEnd == false)
{
<CnGalWebSite.Shared.MasaComponent.Shared.Components.MasaButton Fab Icon="mdi-wallet-giftcard " Tooltip="抽奖" OnClick="OnDraw" Color="info" Class="me-3"/>
}
Expand Down

0 comments on commit 46e63fd

Please sign in to comment.