|
@@ -47,14 +47,14 @@ namespace TEAMModelFunction
|
|
|
_azureRedis.GetRedisClient(8).KeyDelete($"Survey:Submit:{survey.id}");
|
|
|
if (data != null)
|
|
|
{
|
|
|
- data.ttl = 1;
|
|
|
+
|
|
|
if (survey.scope == "school")
|
|
|
{
|
|
|
- data = await client.GetContainer("TEAMModelOS", "School").ReplaceItemAsync<ActivityData>(data, adid, new Azure.Cosmos.PartitionKey($"{adcode}"));
|
|
|
+ data = await client.GetContainer("TEAMModelOS", "School").DeleteItemAsync<ActivityData>( adid, new Azure.Cosmos.PartitionKey($"{data.code}"));
|
|
|
}
|
|
|
else if (survey.scope == "private")
|
|
|
{
|
|
|
- data = await client.GetContainer("TEAMModelOS", "Teacher").ReplaceItemAsync<ActivityData>(data, adid, new Azure.Cosmos.PartitionKey($"{adcode}"));
|
|
|
+ data = await client.GetContainer("TEAMModelOS", "Teacher").DeleteItemAsync<ActivityData>( adid, new Azure.Cosmos.PartitionKey($"{data.code}"));
|
|
|
}
|
|
|
}
|
|
|
await _dingDing.SendBotMsg($"问卷调查【{survey.name}-{survey.id}】被删除", GroupNames.成都开发測試群組);
|