|
@@ -215,7 +215,7 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
{
|
|
|
Student student = await cosmosClient.GetContainer("TEAMModelOS", Constant.Student).ReadItemAsync<Student>(id, new PartitionKey($"Base-{school}"));
|
|
|
student.loginInfos = new List<LoginInfo>() { new LoginInfo { expire = Expire, ip = ip, time = now } };
|
|
|
- await cosmosClient.GetContainer("TEAMModelOS", Constant.Student).ReplaceItemAsync<Student>(student, student.id, new PartitionKey("Base"));
|
|
|
+ await cosmosClient.GetContainer("TEAMModelOS", Constant.Student).ReplaceItemAsync<Student>(student, student.id, new PartitionKey($"Base-{school}"));
|
|
|
}
|
|
|
catch { }
|
|
|
break;
|
|
@@ -466,10 +466,10 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
}
|
|
|
|
|
|
string tbScHourSql = $"PartitionKey eq 'HourLogin-{school}' and RowKey le '{delTbHour}'";
|
|
|
- await table.DeleteStringWhere<BIOptLog>(rowKey: tbHourSql); //删除学校168小时前的数据
|
|
|
+ await table.DeleteStringWhere<BIOptLog>(rowKey: tbScHourSql); //删除学校168小时前的数据
|
|
|
|
|
|
string tbScDaySql = $"PartitionKey eq 'DayLogin-{school}' and RowKey le '{delTbDay}'";
|
|
|
- await table.DeleteStringWhere<BIOptLog>(rowKey: tbDaySql); //删除学校180天前的数据
|
|
|
+ await table.DeleteStringWhere<BIOptLog>(rowKey: tbScDaySql); //删除学校180天前的数据
|
|
|
}
|
|
|
|
|
|
await response.WriteAsJsonAsync(new { data = json });
|