|
@@ -62,14 +62,14 @@ namespace TEAMModelOS.FunctionV4
|
|
|
messageVote.ApplicationProperties.Add("name", "Vote");
|
|
|
if (voteRecords.Count > 0)
|
|
|
{
|
|
|
- long start = await _serviceBus.GetServiceBusClient().SendScheduleMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), messageVote, DateTimeOffset.FromUnixTimeMilliseconds(tdata.stime));
|
|
|
+ long start = await _serviceBus.GetServiceBusClient().SendScheduleMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), messageVote, DateTimeOffset.FromUnixTimeMilliseconds(tdata.startTime));
|
|
|
await _serviceBus.GetServiceBusClient().cancelMessage(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), voteRecords[0].sequenceNumber);
|
|
|
voteRecords[0].sequenceNumber = start;
|
|
|
await _azureStorage.SaveOrUpdate<ChangeRecord>(voteRecords[0]);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- long start = await _serviceBus.GetServiceBusClient().SendScheduleMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), messageVote, DateTimeOffset.FromUnixTimeMilliseconds(tdata.stime));
|
|
|
+ long start = await _serviceBus.GetServiceBusClient().SendScheduleMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), messageVote, DateTimeOffset.FromUnixTimeMilliseconds(tdata.startTime));
|
|
|
ChangeRecord changeRecord = new ChangeRecord
|
|
|
{
|
|
|
RowKey = tdata.id,
|
|
@@ -232,14 +232,14 @@ namespace TEAMModelOS.FunctionV4
|
|
|
messageVoteEnd.ApplicationProperties.Add("name", "Vote");
|
|
|
if (voteRecords.Count > 0)
|
|
|
{
|
|
|
- long end = await _serviceBus.GetServiceBusClient().SendScheduleMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), messageVoteEnd, DateTimeOffset.FromUnixTimeMilliseconds(tdata.etime));
|
|
|
+ long end = await _serviceBus.GetServiceBusClient().SendScheduleMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), messageVoteEnd, DateTimeOffset.FromUnixTimeMilliseconds(tdata.endTime));
|
|
|
await _serviceBus.GetServiceBusClient().cancelMessage(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), voteRecords[0].sequenceNumber);
|
|
|
voteRecords[0].sequenceNumber = end;
|
|
|
await _azureStorage.SaveOrUpdate<ChangeRecord>(voteRecords[0]);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- long end = await _serviceBus.GetServiceBusClient().SendScheduleMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), messageVoteEnd, DateTimeOffset.FromUnixTimeMilliseconds(tdata.etime));
|
|
|
+ long end = await _serviceBus.GetServiceBusClient().SendScheduleMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), messageVoteEnd, DateTimeOffset.FromUnixTimeMilliseconds(tdata.endTime));
|
|
|
ChangeRecord changeRecord = new ChangeRecord
|
|
|
{
|
|
|
RowKey = tdata.id,
|
|
@@ -250,12 +250,12 @@ namespace TEAMModelOS.FunctionV4
|
|
|
await _azureStorage.Save<ChangeRecord>(changeRecord);
|
|
|
}
|
|
|
#if DEBUG
|
|
|
- await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}投票活动{tdata.id}将于:{tdata.etime}完成并结算!", GroupNames.成都开发測試群組);
|
|
|
+ await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}投票活动{tdata.id}将于:{tdata.endTime}完成并结算!", GroupNames.成都开发測試群組);
|
|
|
#endif
|
|
|
break;
|
|
|
case "finish":
|
|
|
#if DEBUG
|
|
|
- await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}投票活动{tdata.id}开始结算{tdata.etime}!", GroupNames.成都开发測試群組);
|
|
|
+ await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}投票活动{tdata.id}开始结算{tdata.endTime}!", GroupNames.成都开发測試群組);
|
|
|
#endif
|
|
|
//获取投票活动的所有投票记录
|
|
|
var records = await _azureRedis.GetRedisClient(8).HashGetAllAsync($"Vote:Record:{vote.id}");
|