SportsRoutineReport
This commit is contained in:
parent
fbcac61823
commit
94971e02db
@ -213,7 +213,7 @@ namespace YD_AllHeartRates.Api.Services.Impl
|
||||
}
|
||||
|
||||
string timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
Console.WriteLine($"[GetStudentEduId] Timestamp: {timestamp}");
|
||||
Console.WriteLine($"[SportsRoutineReport] Timestamp: {timestamp}");
|
||||
|
||||
var headers = new Dictionary<string, string>
|
||||
{
|
||||
@ -236,11 +236,11 @@ namespace YD_AllHeartRates.Api.Services.Impl
|
||||
try
|
||||
{
|
||||
jsonPlain = JsonConvert.SerializeObject(package, Formatting.None);
|
||||
Console.WriteLine($"[GetStudentEduId] Package JSON: {jsonPlain}");
|
||||
Console.WriteLine($"[SportsRoutineReport] Package JSON: {jsonPlain}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"[GetStudentEduId] Package序列化失败: {ex}");
|
||||
Console.WriteLine($"[SportsRoutineReport] Package序列化失败: {ex}");
|
||||
throw;
|
||||
}
|
||||
|
||||
@ -249,11 +249,11 @@ namespace YD_AllHeartRates.Api.Services.Impl
|
||||
try
|
||||
{
|
||||
bodyEncrypted = DataEncryptHelper.EncryptSm2Zip(jsonPlain, AppSettings.DataPush.PublicKey);
|
||||
Console.WriteLine($"[GetStudentEduId] Encrypted BODY (Hex): {bodyEncrypted}");
|
||||
Console.WriteLine($"[SportsRoutineReport] Encrypted BODY (Hex): {bodyEncrypted}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"[GetStudentEduId] SM2加密失败: {ex}");
|
||||
Console.WriteLine($"[SportsRoutineReport] SM2加密失败: {ex}");
|
||||
throw;
|
||||
}
|
||||
|
||||
@ -270,11 +270,11 @@ namespace YD_AllHeartRates.Api.Services.Impl
|
||||
contentType: "application/json",
|
||||
headers: headers
|
||||
);
|
||||
Console.WriteLine($"[GetStudentEduId] Response: {responseText}");
|
||||
Console.WriteLine($"[SportsRoutineReport] Response: {responseText}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"[GetStudentEduId] HTTP请求失败: {ex}");
|
||||
Console.WriteLine($"[SportsRoutineReport] HTTP请求失败: {ex}");
|
||||
throw;
|
||||
}
|
||||
|
||||
@ -295,7 +295,7 @@ namespace YD_AllHeartRates.Api.Services.Impl
|
||||
// 成功返回固定响应
|
||||
resp.code = 200;
|
||||
resp.msg = "数据上报成功";
|
||||
Console.WriteLine("[GetStudentEduId] 数据上报成功");
|
||||
Console.WriteLine("[SportsRoutineReport] 数据上报成功");
|
||||
return resp;
|
||||
}
|
||||
else
|
||||
@ -303,7 +303,7 @@ namespace YD_AllHeartRates.Api.Services.Impl
|
||||
// 接口返回错误
|
||||
resp.code = 500;
|
||||
resp.msg = $"接口返回错误: {msgStr}";
|
||||
Console.WriteLine($"[GetStudentEduId] 接口返回错误: code={codeStr}, msg={msgStr}");
|
||||
Console.WriteLine($"[SportsRoutineReport] 接口返回错误: code={codeStr}, msg={msgStr}");
|
||||
return resp;
|
||||
}
|
||||
}
|
||||
@ -312,7 +312,7 @@ namespace YD_AllHeartRates.Api.Services.Impl
|
||||
{
|
||||
resp.code = 500;
|
||||
resp.msg = "JSON解析异常";
|
||||
Console.WriteLine($"[GetStudentEduId] JSON解析失败: {ex}");
|
||||
Console.WriteLine($"[SportsRoutineReport] JSON解析失败: {ex}");
|
||||
return resp;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user