|
@@ -195,14 +195,19 @@ namespace TEAMModelOS.Controllers.Learn
|
|
|
JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
|
|
|
if (ValidateHelper.IsValid(request.@params))
|
|
|
{
|
|
|
- request.@params.ForEach(x =>
|
|
|
- {
|
|
|
- if (string.IsNullOrEmpty(x.id))
|
|
|
+
|
|
|
+ foreach (LearningAutonomous learningAutonomous1 in request.@params) {
|
|
|
+
|
|
|
+ if (string.IsNullOrEmpty(learningAutonomous1.id))
|
|
|
{
|
|
|
- x.id = new Guid().ToString();
|
|
|
- x.createTime = new DateTimeOffset(DateTime.UtcNow).ToUnixTimeMilliseconds();
|
|
|
+ learningAutonomous1.id = new Guid().ToString();
|
|
|
+ learningAutonomous1.createTime = new DateTimeOffset(DateTime.UtcNow).ToUnixTimeMilliseconds();
|
|
|
}
|
|
|
- });
|
|
|
+ }
|
|
|
+ //request.@params.ForEach(x =>
|
|
|
+ //{
|
|
|
+
|
|
|
+ //});
|
|
|
List<LearningAutonomous> learningAutonomous = await cosmosDBV3Repository.SaveOrUpdateAll<LearningAutonomous>(request.@params);
|
|
|
builder.Data(learningAutonomous);
|
|
|
}
|