public ExpressQueryResult ConvertResult(string param)
        {
            var result = new ExpressQueryResult()
            {
                Status = -1
            };
            var tt = Newtonsoft.Json.JsonConvert.DeserializeObject <AliyunExpressResult>(param);

            if (tt.status == 0)
            {
                result.Status = 0;
            }
        }
Esempio n. 2
0
        public ExpressQueryResult ConvertResult(string param)
        {
            ExpressQueryResult result = new ExpressQueryResult();
            var tt = Newtonsoft.Json.JsonConvert.DeserializeObject <SJZHExpressResult>(param);

            if (tt.ERRORCODE == 0)
            {
                result.Status = 0;
                result.Msg    = "";
                result.Result = new List <ExpressDetail>();
                if (tt.RESULT != null)
                {
                    foreach (var item in tt.RESULT.context)
                    {
                        ExpressDetail detail = new ExpressDetail();
                        detail.ModifyTime = item.time;
                        detail.Message    = item.desc;
                    }
                }
            }
            return(result);
        }