|
@@ -41,6 +41,7 @@ using System.Security.Policy;
|
|
using System.Net.Http.Headers;
|
|
using System.Net.Http.Headers;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Newtonsoft.Json.Linq;
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
+using static TEAMModelOS.SDK.Models.JointEvent;
|
|
|
|
|
|
namespace TEAMModelOS.Function
|
|
namespace TEAMModelOS.Function
|
|
{
|
|
{
|
|
@@ -3282,6 +3283,7 @@ namespace TEAMModelOS.Function
|
|
|
|
|
|
string location = Environment.GetEnvironmentVariable("Option:Location");
|
|
string location = Environment.GetEnvironmentVariable("Option:Location");
|
|
var client = _azureCosmos.GetCosmosClient();
|
|
var client = _azureCosmos.GetCosmosClient();
|
|
|
|
+ var table = _azureStorage.GetCloudTableClient().GetTableReference("ChangeRecord");
|
|
string lang = (location.Contains("China")) ? "zh-cn" : "zh-tw";
|
|
string lang = (location.Contains("China")) ? "zh-cn" : "zh-tw";
|
|
|
|
|
|
StringBuilder sqlStr = new StringBuilder($"SELECT DISTINCT c.creatorId, c.creatorName, c.creatorEmail FROM c WHERE c.jointEventId = '{jointEventId}' ");
|
|
StringBuilder sqlStr = new StringBuilder($"SELECT DISTINCT c.creatorId, c.creatorName, c.creatorEmail FROM c WHERE c.jointEventId = '{jointEventId}' ");
|
|
@@ -3340,6 +3342,15 @@ namespace TEAMModelOS.Function
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //將寄送訊息刪除
|
|
|
|
+ string tablePartitionKey = string.Format("{0}{1}{2}{3}{4}", "JointMessage", "-", $"{jointEventId}", "-", $"{type}"); //主key: JointMessage-{jointEventId}-{type} RowKey: {jointScheduleId}
|
|
|
|
+ string tableRowKey = $"{jointScheduleId}";
|
|
|
|
+ List<ChangeRecord> records = await table.FindListByDict<ChangeRecord>(new Dictionary<string, object>() { { "RowKey", tableRowKey }, { "PartitionKey", tablePartitionKey } });
|
|
|
|
+ if (records.Count > 0)
|
|
|
|
+ {
|
|
|
|
+ await table.Delete<ChangeRecord>(records[0]);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
{
|
|
{
|