Skip to content

Commit

Permalink
修复同步预约抽奖用户时号码分配重复的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleFish-233 committed Apr 25, 2023
1 parent 359025e commit cebf3ff
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -391,14 +391,15 @@ 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
{
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)
});
Expand Down

0 comments on commit cebf3ff

Please sign in to comment.