Exemplo n.º 1
0
 public static string ExecuteOrderProcess(ExecuteOrderProcessRequest request)
 {
     if (request != null)
     {
         using (var client = new OrderOperationClient())
         {
             var clientResult = client.ExecuteOrderProcess(request);
             clientResult.ThrowIfException(true);
             return(clientResult.Result);
         }
     }
     return(null);
 }
Exemplo n.º 2
0
        public static bool ExecuteOrderProcess(ExecuteOrderProcessRequest request)
        {
            var result = false;

            try
            {
                var executeResult = BaoYangExternalService.ExecuteOrderProcess(request);
                result = string.IsNullOrEmpty(executeResult);
                if (!result)
                {
                    Logger.Warn($"更新订单{request.OrderId}失败, request=>{JsonConvert.SerializeObject(request)}result=>{executeResult}");
                }
            }
            catch (Exception ex)
            {
                Logger.Error($"更新订单信息失败!request=>{JsonConvert.SerializeObject(request)}", ex);
            }
            return(result);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 更新订单状态
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>

        public static string ExecuteOrderProcess(ExecuteOrderProcessRequest request)
        {
            var result = string.Empty;

            try
            {
                using (var client = new OrderOperationClient())
                {
                    var clientResult = client.ExecuteOrderProcess(request);
                    clientResult.ThrowIfException(true);
                    result = clientResult.Result;
                    if (!string.IsNullOrEmpty(result))
                    {
                        Logger.Warn($"更新订单{request.OrderId}失败,result:{result}");
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
            }

            return(result);
        }