Compare commits

...

2 Commits

Author SHA1 Message Date
782737d29c 0 2025-07-22 14:09:36 +08:00
ff93525afe 0 2025-07-22 14:09:17 +08:00
2 changed files with 8 additions and 3 deletions

View File

@ -6,11 +6,14 @@ using System.Threading.Tasks;
namespace MyCode.Project.Domain.Message.Response.WMS
{
/// <summary>
/// WMS响应对象
/// </summary>
public class WMSResponse
{
public int Code { get; set; }
public int? Code { get; set; }
public string Message { get; set; }
public Dictionary<string, string> Value { get; set; }
public int View { get; set; }
public int? View { get; set; }
}
}

View File

@ -258,12 +258,14 @@ namespace MyCode.Project.Services.Implementation
request.AddParameter("application/json", requestString, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
var resultContent = response.Content;
LogHelper.Info("请求:" + requestString);
LogHelper.Info("响应:" + resultContent);
var result = JsonHelper.ToObject<WMSResponse>(resultContent);
if (result.Code != 200)
{
throw new Exception("推送WMS发生错误" + resultContent);
}
LogHelper.Info(resultContent);
return result;
}