Merge branch 'jackYun' of http://8.130.121.29:3000/yuyubo/YunTongJackYunTask into jackYun
This commit is contained in:
commit
564f5720af
@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user