timestamp

This commit is contained in:
tanglong 2025-10-30 18:57:50 +08:00
parent e2fbe02055
commit ba608f4ee7
2 changed files with 6 additions and 6 deletions

View File

@ -50,8 +50,8 @@ namespace YD_AllHeartRates.Api.Controllers
XSEDUID = "d1cd4ff5-6511-58b8-809f-22d102b3c20d",
HDSJ = new List<HeartRateRecordDto>
{
new HeartRateRecordDto { SJSJ = "2025-07-04 10:00:00", XL = 90, JXXL = 80 },
new HeartRateRecordDto { SJSJ = "2025-07-04 10:01:00", XL = 92, JXXL = 80 }
new HeartRateRecordDto { SJSJ = "2025-10-30 18:50:00", XL = 90, JXXL = 80 },
new HeartRateRecordDto { SJSJ = "2025-10-30 18:51:00", XL = 92, JXXL = 80 }
}
},
new StudentData
@ -60,7 +60,7 @@ namespace YD_AllHeartRates.Api.Controllers
XSEDUID = "d1cd4ff5-6511-58b8-809f-22d102b3c20e",
HDSJ = new List<HeartRateRecordDto>
{
new HeartRateRecordDto { SJSJ = "2025-07-04 10:00:00", XL = 88, JXXL = 78 }
new HeartRateRecordDto { SJSJ = "2025-10-30 18:50:00", XL = 88, JXXL = 78 }
}
}
};

View File

@ -212,7 +212,7 @@ namespace YD_AllHeartRates.Api.Services.Impl
return resp;
}
long timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
string timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
Console.WriteLine($"[GetStudentEduId] Timestamp: {timestamp}");
var headers = new Dictionary<string, string>
@ -225,7 +225,7 @@ namespace YD_AllHeartRates.Api.Services.Impl
{
TOKEN = token,
APPID = AppSettings.DataPush.Appid,
SCSJ = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
SCSJ = timestamp,
SJCOUNT = data?.Count ?? 0,
CLIENT_ID = AppSettings.DataPush.ClientId,
DATA = data
@ -235,7 +235,7 @@ namespace YD_AllHeartRates.Api.Services.Impl
string jsonPlain;
try
{
jsonPlain = JsonConvert.SerializeObject(package, Formatting.None);
jsonPlain = JsonConvert.SerializeObject(package, Formatting.None);
Console.WriteLine($"[GetStudentEduId] Package JSON: {jsonPlain}");
}
catch (Exception ex)