示例#1
0
        public ResultModel <BusiOrderResultModel> Push(BussinessOrderInfoPM model)
        {
            try
            {
                //通过传过来的字符串序列化对象
                model.listOrderChlid = ParseHelper.Deserialize <List <OrderChlidPM> >(model.OrderChlidJson);

                order order;
                ResultModel <BusiOrderResultModel> currResModel = Verification(model, out order);
                if (currResModel.Status == PubOrderStatus.VerificationSuccess.GetHashCode())
                {
                    PubOrderStatus cuStatus = iOrderProvider.AddOrder(order);
                    if (cuStatus == PubOrderStatus.Success)//当前订单执行成功
                    {
                        BusiOrderResultModel resultModel = new BusiOrderResultModel {
                            userId = model.userId
                        };
                        return(ResultModel <BusiOrderResultModel> .Conclude(PubOrderStatus.Success, resultModel));
                    }
                    return(ResultModel <BusiOrderResultModel> .Conclude(cuStatus));
                }
                return(currResModel);
            }
            catch (Exception ex)
            {
                LogHelper.LogWriter("ResultModel<BusiOrderResultModel> Push()方法出错", new { obj = "时间:" + DateTime.Now.ToString() + ex.Message });
                return(ResultModel <BusiOrderResultModel> .Conclude(PubOrderStatus.InvalidPubOrder));
            }
        }