From cebf3ffb9b2971b4050c9cadcaa88f2dfe64ea1c Mon Sep 17 00:00:00 2001 From: LittleFish-233 Date: Tue, 25 Apr 2023 14:03:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=8C=E6=AD=A5=E9=A2=84?= =?UTF-8?q?=E7=BA=A6=E6=8A=BD=E5=A5=96=E7=94=A8=E6=88=B7=E6=97=B6=E5=8F=B7?= =?UTF-8?q?=E7=A0=81=E5=88=86=E9=85=8D=E9=87=8D=E5=A4=8D=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Application/Lotteries/LotteryService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CnGalWebSite/CnGalWebSite.APIServer/Application/Lotteries/LotteryService.cs b/CnGalWebSite/CnGalWebSite.APIServer/Application/Lotteries/LotteryService.cs index 43dfe4697..9074164f6 100644 --- a/CnGalWebSite/CnGalWebSite.APIServer/Application/Lotteries/LotteryService.cs +++ b/CnGalWebSite/CnGalWebSite.APIServer/Application/Lotteries/LotteryService.cs @@ -391,6 +391,7 @@ public async Task CopyUserFromBookingToLottery(Booking booking,Lottery lottery) var users = booking.Users.Where(s => lottery.Users.Any(x => x.ApplicationUserId == s.ApplicationUserId) == false).Select(s => s.ApplicationUser); var time = DateTime.Now.ToCstTime(); + var count = lottery.Users.Count; foreach (var item in users) { await _lotteryUserRepository.InsertAsync(new LotteryUser @@ -398,7 +399,7 @@ public async Task CopyUserFromBookingToLottery(Booking booking,Lottery lottery) ApplicationUserId = item.Id, LotteryId = lottery.Id, ParticipationTime = time, - Number = lottery.Users.Count + 1, + Number = count + 1, //查找是否有相同的特征值 IsHidden = await _operationRecordService.CheckOperationRecord(OperationRecordType.Lottery, lottery.Id.ToString(), item) });