Example #1
0
 public PayController(IMemberBLL memberBLL, IOrderBLL orderBLL,
                      ITransactionBLL transactionBLL, IRechargeBLL rechargeBLL,
                      ICreditRecordBLL creditRecordBLL, IRulesBLL rulesBLL,
                      IOrderDetailBLL orderDetailBLL, IGoodsBLL goodsBLL,
                      IServiceBLL serviceBLL, IServiceQRBLL serviceQRBLL,
                      IServiceConsumeRecordBLL serviceConsumeRecordBLL,
                      IServiceConsumePasswordBLL serviceConsumePasswordBLL,
                      IExchangeServiceRecordBLL exchangeServiceRecordBLL,
                      IExchangeServiceBLL exchangeServiceBLL,
                      IExchangeServiceQRBLL exchangeServiceQRBLL)
 {
     _memberBLL                 = memberBLL;
     _orderBLL                  = orderBLL;
     _transactionBLL            = transactionBLL;
     _recharegeBLL              = rechargeBLL;
     _creditRecordBLL           = creditRecordBLL;
     _orderDetailBLL            = orderDetailBLL;
     _goodsBLL                  = goodsBLL;
     _serviceBLL                = serviceBLL;
     _rulesBLL                  = rulesBLL;
     _serviceQRBLL              = serviceQRBLL;
     _serviceConsumeRecoredBLL  = serviceConsumeRecordBLL;
     _serviceConsumePasswordBLL = serviceConsumePasswordBLL;
     _exchangeServiceRecordBLL  = exchangeServiceRecordBLL;
     _exchangeServiceBLL        = exchangeServiceBLL;
     _exchangeServiceQRBLL      = exchangeServiceQRBLL;
 }
Example #2
0
    protected override void OnInit(EventArgs e)
    {
        IOrderBLL orderBLL = (IOrderBLL)SpringContext.Context.CreateSecurityProxyInstance("OrderBLL");

        _order = orderBLL.Select(new Guid(Request.QueryString["id"].ToString()));
        base.OnInit(e);
    }
Example #3
0
        public ActionResult OrderList(StoreOrderSearchModel model)
        {
            //获取登录用户的门店
            int      userId  = GetSessionModel().UserID;
            IShopBLL shopBll = BLLFactory <IShopBLL> .GetBLL("ShopBLL");

            var shop = shopBll.GetEntity(u => u.ShopUserId == userId);

            //如果该门店存在
            if (shop != null)
            {
                //获取订单状态下拉列表
                model.OrderStatusList = GetOrderStatusList(shop.Type.Contains(ConstantParam.SHOP_TYPE_0.ToString()));

                //获取支付方式下拉列表
                model.PayWayList = GetPayWayList(shop.Type.Contains(ConstantParam.SHOP_TYPE_0.ToString()));

                //初始化默认查询模型
                DateTime today = DateTime.Today;
                if (model.StartDate == null)
                {
                    model.StartDate = today.AddDays(-today.Day + 1);
                }
                if (model.EndDate == null)
                {
                    model.EndDate = today;
                }

                //获取当前门店ID
                var shopId = GetCurrentShopId().Value;

                //根据订单日期查询
                DateTime endDate = model.EndDate.Value.AddDays(1);
                Expression <Func <T_Order, bool> > where = u => u.OrderDate >= model.StartDate.Value && u.OrderDate < endDate && u.ShopId == shopId &&
                                                           u.DelFlag == ConstantParam.DEL_FLAG_DEFAULT && u.IsStoreHided == ConstantParam.DEL_FLAG_DEFAULT;

                //根据订单状态查询
                if (model.OrderStatus != null)
                {
                    where = PredicateBuilder.And(where, u => u.OrderStatus == model.OrderStatus);
                }

                //根据支付方式查询
                if (model.PayWay != null)
                {
                    where = PredicateBuilder.And(where, u => u.PayWay == model.PayWay);
                }

                //根据查询条件调用BLL层 获取分页数据
                IOrderBLL orderBll = BLLFactory <IOrderBLL> .GetBLL("OrderBLL");

                var sortName = this.SettingSorting("Id", false);
                model.DataList = orderBll.GetPageList(where, sortName.SortName, sortName.IsAsc, model.PageIndex) as PagedList <T_Order>;
                return(View(model));
            }

            //否则返回首页
            return(RedirectToAction("Index", "ShopPlatform"));
        }
Example #4
0
        public ApiResultModel DeleteOrder(DetailSearchModel model)
        {
            ApiResultModel resultModel = new ApiResultModel();

            try
            {
                //获取当前商家用户
                IShopUserBLL shopUserBll = BLLFactory <IShopUserBLL> .GetBLL("ShopUserBLL");

                var user = shopUserBll.GetEntity(u => u.Id == model.UserId && u.DelFlag == ConstantParam.DEL_FLAG_DEFAULT);
                if (user == null)
                {
                    resultModel.Msg = APIMessage.NO_USER;
                    return(resultModel);
                }
                //如果验证Token不通过或已过期
                if (DateTime.Now > user.TokenInvalidTime || model.Token != user.Token)
                {
                    resultModel.Msg = APIMessage.TOKEN_INVALID;
                    return(resultModel);
                }
                //更新最近登录时间和Token失效时间
                user.LatelyLoginTime  = DateTime.Now;
                user.TokenInvalidTime = DateTime.Now.AddDays(Convert.ToInt32(PropertyUtils.GetConfigParamValue("TokenInvalid")));
                shopUserBll.Update(user);

                //获取指定订单
                IOrderBLL orderBll = BLLFactory <IOrderBLL> .GetBLL("OrderBLL");

                var order = orderBll.GetEntity(o => o.Id == model.Id && o.DelFlag == ConstantParam.DEL_FLAG_DEFAULT && o.IsStoreHided == ConstantParam.DEL_FLAG_DEFAULT);

                if (order != null)
                {
                    if (order.OrderStatus == ConstantParam.OrderStatus_FINISH || order.OrderStatus == ConstantParam.OrderStatus_EXIT || order.OrderStatus == ConstantParam.OrderStatus_CLOSE)
                    {
                        order.IsStoreHided = ConstantParam.DEL_FLAG_DELETE;
                        //删除订单
                        if (!orderBll.Update(order))
                        {
                            resultModel.Msg = "订单删除失败";
                        }
                    }
                    else
                    {
                        resultModel.Msg = "当前状态的订单不能被删除";
                    }
                }
                else
                {
                    resultModel.Msg = APIMessage.ORDER_NOEXIST;
                }
            }
            catch
            {
                resultModel.Msg = APIMessage.REQUEST_EXCEPTION;
            }

            return(resultModel);
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        _orderBLL = (IOrderBLL)SpringContext.Context.CreateSecurityProxyInstance("OrderBLL");

        if (!IsPostBack)
        {
            BindRepeater();
        }
    }
Example #6
0
 public HomeController(IMemberBLL memberBLL,
                       IOrderBLL orderBLL, IOrderStatusBLL orderStatusBLL,
                       IAddressBLL addressBLL)
 {
     _memberBLL      = memberBLL;
     _orderBLL       = orderBLL;
     _orderStatusBLL = orderStatusBLL;
     _addressBLL     = addressBLL;
 }
Example #7
0
 public AdminController()
 {
     this._changeLogLogic = new ChangeLogBLL();
     this._errorLogLogic  = new ErrorLogBLL();
     this._filmLogic      = new FilmBLL();
     this._menyLogic      = new MenuBLL();
     this._orderLogic     = new OrderBLL();
     this._priceLogic     = new PriceBLL();
     this._UserLogic      = new UserBLL();
 }
Example #8
0
 public AdminController(IChangeLogBLL CS, IErrorLogBLL ES, IFilmBLL FS, IMenuBLL MS, IOrderBLL OS, IPriceBLL PS, IUserBLL US)
 {
     _changeLogLogic = CS;
     _errorLogLogic  = ES;
     _filmLogic      = FS;
     _menyLogic      = MS;
     _orderLogic     = OS;
     _priceLogic     = PS;
     _UserLogic      = US;
 }
Example #9
0
        public ActionResult UpdateOrderStatus(OrderStatusUpdateModel model)
        {
            JsonModel jm = new JsonModel();

            //如果表单模型验证成功
            if (ModelState.IsValid)
            {
                //获取指定订单
                IOrderBLL orderBll = BLLFactory <IOrderBLL> .GetBLL("OrderBLL");

                var order = orderBll.GetEntity(o => o.Id == model.OrderId && o.DelFlag == ConstantParam.DEL_FLAG_DEFAULT && o.IsStoreHided == ConstantParam.DEL_FLAG_DEFAULT);
                if (order != null)
                {
                    string alert = "";

                    if (model.OrderStatus == ConstantParam.OrderStatus_RECEIPT)
                    {
                        alert             = "您在" + order.Shop.ShopName + "提交的订单商家已接单,请您耐心等待收货";
                        order.OrderStatus = model.OrderStatus;
                    }
                    else if (model.OrderStatus == ConstantParam.OrderStatus_FINISH)
                    {
                        alert              = "您在" + order.Shop.ShopName + "提交的订单交易已完成";
                        order.OrderStatus  = ConstantParam.OrderStatus_FINISH;
                        order.CompleteTime = DateTime.Now;
                    }
                    //如果订单修改成功
                    if (orderBll.Update(order))
                    {
                        //推送给订单所属用户
                        IUserPushBLL userPushBLL = BLLFactory <IUserPushBLL> .GetBLL("UserPushBLL");

                        var userPush = userPushBLL.GetEntity(p => p.UserId == order.AppUserId);
                        if (userPush != null)
                        {
                            string registrationId = userPush.RegistrationId;

                            //通知信息
                            PropertyUtils.SendPush("订单最新状态", alert, ConstantParam.MOBILE_TYPE_OWNER, registrationId);
                        }
                    }
                }
                else
                {
                    jm.Msg = "该订单已不存在";
                }
            }
            else
            {
                jm.Msg = ConstantParam.JSON_RESULT_MODEL_CHECK_ERROR;
            }
            return(Json(jm, JsonRequestBehavior.AllowGet));
        }
Example #10
0
 public OrderController(IOrderDetailBLL orderDetailBLL, IOrderBLL orderBLL,
                        IMemberBLL memberBLL, IGoodsBLL goodsBLL, IAddressBLL addressBLL,
                        IGoodsImagesBLL goodsImagesBLL, ICartBLL cartBLL, IRulesBLL rulesBLL,
                        IOrderStatusBLL orderStatusBLL)
 {
     _orderDetailBLL = orderDetailBLL;
     _orderBLL       = orderBLL;
     _memberBLL      = memberBLL;
     _goodsBLL       = goodsBLL;
     _addressBLL     = addressBLL;
     _goodsImagesBLL = goodsImagesBLL;
     _cartBLL        = cartBLL;
     _rulesBLL       = rulesBLL;
     _orderStausBLL  = orderStatusBLL;
 }
Example #11
0
        public ActionResult AlipayPayNotifyUrl()
        {
            SortedDictionary <string, string> sArray = new SortedDictionary <string, string>();
            NameValueCollection coll;

            coll = Request.Form;
            String[] requestItem = coll.AllKeys;

            for (int i = 0; i < requestItem.Length; i++)
            {
                sArray.Add(requestItem[i], Request.Form[requestItem[i]]);
            }

            //判断是否有带返回参数
            if (sArray.Count > 0)
            {
                Notify aliNotify    = new Notify();
                bool   verifyResult = aliNotify.Verify(sArray, Request.Form["notify_id"], Request.Form["sign"]);
                verifyResult = true;
                //如果验证成功
                if (verifyResult)
                {
                    //如果支付成功
                    if (Request.Form["trade_status"] == "TRADE_SUCCESS")
                    {
                        IOrderBLL orderBll = BLLFactory <IOrderBLL> .GetBLL("OrderBLL");

                        string orderNo = Request.Form["out_trade_no"];
                        var    order   = orderBll.GetEntity(o => o.OrderNo == orderNo);
                        if (order != null)
                        {
                            order.OrderStatus = ConstantParam.OrderStatus_RECEIPT;
                            order.PayTradeNo  = Request.Form["trade_no"];
                            orderBll.Update(order);
                        }
                    }
                    return(Content("success"));
                }
                else//验证失败
                {
                    return(Content("fail"));
                }
            }
            else
            {
                return(Content("无通知参数"));
            }
        }
Example #12
0
        public ActionResult OrderDetail(int id)
        {
            IOrderBLL orderBll = BLLFactory <IOrderBLL> .GetBLL("OrderBLL");

            //获取要查看的订单
            T_Order order = orderBll.GetEntity(u => u.Id == id && u.DelFlag == ConstantParam.DEL_FLAG_DEFAULT && u.IsStoreHided == ConstantParam.DEL_FLAG_DEFAULT);

            if (order != null)
            {
                return(View(order));
            }
            else
            {
                return(RedirectToAction("OrderList"));
            }
        }
Example #13
0
 public UserInfoController(IMemberBLL memberBLL, IGoodsBLL goodsBLL,
                           IGoodsImagesBLL goodsImagesBLL, IReCommendBLL recommendBLL,
                           IRechargeBLL rechargeBLL, ICarBLL carBLL, IServiceBLL serviceBLL,
                           IExchangeServiceRecordBLL exchangeServiceRecordBLL,
                           IExchangeServiceBLL exchangeServiceBLL, ITransactionBLL transactionBLL, IOrderBLL orderBLL)
 {
     _memberBLL                = memberBLL;
     _goodsBLL                 = goodsBLL;
     _goodsImageBLL            = goodsImagesBLL;
     _recommendBLL             = recommendBLL;
     _rechargeBLL              = rechargeBLL;
     _carBLL                   = carBLL;
     _serviceBLL               = serviceBLL;
     _exchangeServiceBLL       = exchangeServiceBLL;
     _exchangeServiceRecordBLL = exchangeServiceRecordBLL;
     _transactionBLL           = transactionBLL;
     _orderBLL                 = orderBLL;
 }
Example #14
0
        public ActionResult RecedeOrder(int id)
        {
            IOrderBLL orderBll = BLLFactory <IOrderBLL> .GetBLL("OrderBLL");

            T_Order order = orderBll.GetEntity(o => o.Id == id && o.DelFlag == ConstantParam.DEL_FLAG_DEFAULT && o.IsStoreHided == ConstantParam.DEL_FLAG_DEFAULT);

            if (order != null)
            {
                RecedeReasonModel model = new RecedeReasonModel()
                {
                    OrderId = order.Id,
                    OrderNo = order.OrderNo
                };
                return(View(model));
            }
            else
            {
                return(RedirectToAction("OrderList"));
            }
        }
Example #15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        _orderBLL = (IOrderBLL)SpringContext.Context.CreateInstance("OrderBLL");

        string cmd = Request.QueryString["cmd"];

        switch (cmd)
        {
        case "list":
            List();
            break;

        case "del":
            Del();
            break;

        default:
            break;
        }
    }
Example #16
0
    protected void btnOrder_Click(object sender, EventArgs e)
    {
        IUserBLL userBll = (IUserBLL)SpringContext.Context.CreateSecurityProxyInstance("UserBLL");

        Order order = new Order();

        order.ID         = Guid.NewGuid();
        order.CreateTime = DateTime.Now;
        order.Status     = 0;
        order.CustomID   = userBll.UserID;

        order.OrderProducts = _shopCarBLL.GetList();
        for (int i = 0; i < order.OrderProducts.Count; i++)
        {
            order.OrderProducts[i].OrderID = order.ID;
        }

        IOrderBLL orderBll = (IOrderBLL)SpringContext.Context.CreateSecurityProxyInstance("OrderBLL");

        orderBll.Insert(order);

        Response.Redirect("OrderList.aspx", true);
    }
Example #17
0
    private void Order()
    {
        IUserBLL userBLL = (IUserBLL)SpringContext.Context.CreateInstance("UserBLL");

        Model.Order order = new Model.Order();
        order.ID         = Guid.NewGuid();
        order.CreateTime = DateTime.Now;
        order.Status     = 0;
        order.CustomID   = userBLL.UserID;

        order.OrderProducts = shopCarBLL.GetList();
        for (int i = 0; i < order.OrderProducts.Count; i++)
        {
            order.OrderProducts[i].OrderID = order.ID;
        }

        IOrderBLL orderBll = (IOrderBLL)SpringContext.Context.CreateInstance("OrderBLL");

        orderBll.Insert(order);

        Response.Write("{success:true}");
        Response.End();
    }
Example #18
0
        public ActionResult AlipayRefundNotifyUrl()
        {
            SortedDictionary <string, string> sArray = new SortedDictionary <string, string>();
            NameValueCollection coll;

            coll = Request.Form;
            String[] requestItem = coll.AllKeys;

            for (int i = 0; i < requestItem.Length; i++)
            {
                sArray.Add(requestItem[i], Request.Form[requestItem[i]]);
            }

            //判断是否有带返回参数
            if (sArray.Count > 0)
            {
                Notify aliNotify    = new Notify();
                bool   verifyResult = aliNotify.Verify(sArray, Request.Form["notify_id"], Request.Form["sign"]);
                verifyResult = true;
                if (verifyResult)//验证成功
                {
                    string    TradeNo  = Request.Form["result_details"].Split('^')[0];
                    IOrderBLL orderBll = BLLFactory <IOrderBLL> .GetBLL("OrderBLL");

                    var order = orderBll.GetEntity(o => o.PayTradeNo == TradeNo);
                    if (order != null)
                    {
                        order.OrderStatus = ConstantParam.OrderStatus_EXIT;
                        order.RecedeType  = 2;
                        order.RecedeTime  = DateTime.Now;

                        if (Request.Form["result_details"].Split('^')[2] == "SUCCESS")
                        {
                            order.RefundResult = "退款成功";
                        }
                        else
                        {
                            order.RefundResult = "退款失败";
                        }
                        string alert = "您在" + order.Shop.ShopName + "提交的订单已被商家退单";

                        //如果修改成功
                        if (orderBll.Update(order))
                        {
                            //推送给订单所属用户
                            IUserPushBLL userPushBLL = BLLFactory <IUserPushBLL> .GetBLL("UserPushBLL");

                            var userPush = userPushBLL.GetEntity(p => p.UserId == order.AppUserId);
                            if (userPush != null)
                            {
                                string registrationId = userPush.RegistrationId;

                                //通知信息
                                PropertyUtils.SendPush("订单最新状态", alert, ConstantParam.MOBILE_TYPE_OWNER, registrationId);
                            }
                        }
                    }
                    return(Content("success"));
                }
                else//验证失败
                {
                    return(Content("fail"));
                }
            }
            else
            {
                return(Content("无通知参数"));
            }
        }
Example #19
0
        public ApiPageResultModel GetGoodsList([FromUri] GoodsSearchModel model)
        {
            ApiPageResultModel resultModel = new ApiPageResultModel();

            try
            {
                //获取当前用户
                IShopUserBLL userBll = BLLFactory <IShopUserBLL> .GetBLL("ShopUserBLL");

                T_ShopUser user = userBll.GetEntity(u => u.Id == model.UserId && u.DelFlag == ConstantParam.DEL_FLAG_DEFAULT);

                //如果业主存在
                if (user != null)
                {
                    //如果验证Token不通过或已过期
                    if (DateTime.Now > user.TokenInvalidTime || model.Token != user.Token)
                    {
                        resultModel.Msg = APIMessage.TOKEN_INVALID;
                        return(resultModel);
                    }
                    //更新最近登录时间和Token失效时间
                    user.LatelyLoginTime  = DateTime.Now;
                    user.TokenInvalidTime = DateTime.Now.AddDays(Convert.ToInt32(PropertyUtils.GetConfigParamValue("TokenInvalid")));
                    userBll.Update(user);

                    Expression <Func <T_ShopSale, bool> > where = s => s.InSales == model.InSales && s.GoodsCategory.ShopId == model.ShopId;

                    if (model.GoodsCategoryId > 0)
                    {
                        where = PredicateBuilder.And(where, s => s.GoodsCategoryId == model.GoodsCategoryId);
                    }

                    IOrderBLL orderBll = BLLFactory <IOrderBLL> .GetBLL("OrderBLL");

                    IShopSaleBLL shopSaleBLL = BLLFactory <IShopSaleBLL> .GetBLL("ShopSaleBLL");

                    var list = shopSaleBLL.GetPageList(where, "CreateTime", false, model.PageIndex).Select(
                        s => new
                    {
                        Id             = s.Id,
                        ImgThumbnail   = string.IsNullOrEmpty(s.ImgThumbnail) ? "" : s.ImgThumbnail.Split(';').FirstOrDefault(),
                        Title          = s.Title,
                        Price          = s.Price,
                        RemainingAmout = s.RemainingAmout,
                        SaledCount     = s.OrderDetails.Where(od => od.Order.OrderStatus == ConstantParam.OrderStatus_FINISH).Select(od => od.SaledAmount).ToArray().Sum(),
                        CreateDate     = s.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
                        UnShelveTime   = s.UnShelveTime.HasValue ? s.UnShelveTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",
                        InSales        = s.InSales
                    });

                    resultModel.result = list;
                    resultModel.Total  = shopSaleBLL.Count(where);
                }
                else
                {
                    resultModel.Msg = APIMessage.NO_USER;
                }
            }
            catch
            {
                resultModel.Msg = APIMessage.REQUEST_EXCEPTION;
            }

            return(resultModel);
        }
Example #20
0
        public ApiResultModel UpdateOrderStatus(OrderUpdateStatusModel model)
        {
            ApiResultModel resultModel = new ApiResultModel();

            try
            {
                //获取当前商家用户
                IShopUserBLL shopUserBll = BLLFactory <IShopUserBLL> .GetBLL("ShopUserBLL");

                var user = shopUserBll.GetEntity(u => u.Id == model.UserId && u.DelFlag == ConstantParam.DEL_FLAG_DEFAULT);
                if (user == null)
                {
                    resultModel.Msg = APIMessage.NO_USER;
                    return(resultModel);
                }
                //如果验证Token不通过或已过期
                if (DateTime.Now > user.TokenInvalidTime || model.Token != user.Token)
                {
                    resultModel.Msg = APIMessage.TOKEN_INVALID;
                    return(resultModel);
                }
                //更新最近登录时间和Token失效时间
                user.LatelyLoginTime  = DateTime.Now;
                user.TokenInvalidTime = DateTime.Now.AddDays(Convert.ToInt32(PropertyUtils.GetConfigParamValue("TokenInvalid")));
                shopUserBll.Update(user);

                //获取指定订单
                IOrderBLL orderBll = BLLFactory <IOrderBLL> .GetBLL("OrderBLL");

                var order = orderBll.GetEntity(o => o.Id == model.OrderId && o.DelFlag == ConstantParam.DEL_FLAG_DEFAULT && o.IsStoreHided == ConstantParam.DEL_FLAG_DEFAULT);
                if (order != null)
                {
                    string alert = "";
                    //如果已退单
                    if (model.OrderStatus == ConstantParam.OrderStatus_EXIT)
                    {
                        order.Reason = model.Reason;
                        //如果订单状态为待收货
                        if (order.OrderStatus == ConstantParam.OrderStatus_RECEIPT)
                        {
                            //如果订单支付方式为微信在线支付
                            if (order.PayWay == 1)
                            {
                                //微信退款
                                //获取商家账户信息
                                var wxAccount = order.Shop.ShopAccounts.Where(a => a.AccountType == ConstantParam.PROPERTY_ACCOUNT_WeChat).FirstOrDefault();
                                if (wxAccount == null)
                                {
                                    resultModel.Msg = "该订单所属商家未设置账户信息";
                                    return(resultModel);
                                }
                                //获取商家账户信息
                                string WeixinAppId  = wxAccount.Number;
                                string WeixinMchId  = wxAccount.MerchantNo;
                                string WeixinPayKey = wxAccount.AccountKey;
                                //申请退款
                                string result = ApplyRefund(order, WeixinAppId, WeixinMchId, WeixinPayKey);
                                //如果请求失败
                                if (result == null)
                                {
                                    resultModel.Msg = APIMessage.WEIXIN_REFUND_FAIL;
                                    return(resultModel);
                                }
                                //解析返回数据
                                XmlDocument doc = new XmlDocument();
                                doc.LoadXml(result);
                                //如果返回成功
                                string return_code = doc.GetElementsByTagName("return_code")[0].InnerText;
                                if (return_code == "SUCCESS")
                                {
                                    string result_code = doc.GetElementsByTagName("result_code")[0].InnerText;
                                    if (result_code == "SUCCESS")
                                    {
                                        order.OrderStatus  = model.OrderStatus;
                                        order.RecedeType   = 2;
                                        resultModel.result = "订单退款申请成功";
                                    }
                                    else
                                    {
                                        resultModel.Msg = APIMessage.WEIXIN_REFUND_FAIL;
                                        return(resultModel);
                                    }
                                }
                                else
                                {
                                    resultModel.Msg = APIMessage.WEIXIN_REFUND_FAIL;
                                    return(resultModel);
                                }
                            }
                            //支付宝支付退款
                            else if (order.PayWay == 2)
                            {
                            }
                            else
                            {
                                order.OrderStatus = model.OrderStatus;
                                order.RecedeType  = 0;
                            }
                        }
                        else if (order.OrderStatus == ConstantParam.OrderStatus_CONFIRM)
                        {
                            order.OrderStatus = model.OrderStatus;
                            order.RecedeType  = 0;
                        }
                        order.RecedeTime = DateTime.Now;
                        alert            = "您在" + order.Shop.ShopName + "提交的订单已被商家退单";

                        //如果订单修改成功
                        if (orderBll.CancelOrder(order))
                        {
                            //推送给订单所属用户
                            IUserPushBLL userPushBLL = BLLFactory <IUserPushBLL> .GetBLL("UserPushBLL");

                            var userPush = userPushBLL.GetEntity(p => p.UserId == order.AppUserId);
                            if (userPush != null)
                            {
                                string registrationId = userPush.RegistrationId;

                                //通知信息
                                PropertyUtils.SendPush("订单最新状态", alert, ConstantParam.MOBILE_TYPE_OWNER, registrationId);
                            }
                        }
                    }
                    else
                    {
                        if (model.OrderStatus == ConstantParam.OrderStatus_RECEIPT)
                        {
                            alert             = "您在" + order.Shop.ShopName + "提交的订单商家已接单,请您耐心等待收货";
                            order.OrderStatus = model.OrderStatus;
                        }
                        else if (model.OrderStatus == ConstantParam.OrderStatus_FINISH)
                        {
                            alert              = "您在" + order.Shop.ShopName + "提交的订单交易已完成";
                            order.OrderStatus  = ConstantParam.OrderStatus_FINISH;
                            order.CompleteTime = DateTime.Now;
                        }
                        //如果订单修改成功
                        if (orderBll.Update(order))
                        {
                            //推送给订单所属用户
                            IUserPushBLL userPushBLL = BLLFactory <IUserPushBLL> .GetBLL("UserPushBLL");

                            var userPush = userPushBLL.GetEntity(p => p.UserId == order.AppUserId);
                            if (userPush != null)
                            {
                                string registrationId = userPush.RegistrationId;

                                //通知信息
                                PropertyUtils.SendPush("订单最新状态", alert, ConstantParam.MOBILE_TYPE_OWNER, registrationId);
                            }
                        }
                    }
                }
                else
                {
                    resultModel.Msg = APIMessage.ORDER_NOEXIST;
                }
            }
            catch
            {
                resultModel.Msg = APIMessage.REQUEST_EXCEPTION;
            }
            return(resultModel);
        }
 public OrderController()
 {
     _orderbll = new OrderBLL();
 }
Example #22
0
        public ApiResultModel OrderDetail([FromUri] DetailSearchModel model)
        {
            ApiResultModel resultModel = new ApiResultModel();

            try
            {
                //获取当前商家用户
                IShopUserBLL shopUserBll = BLLFactory <IShopUserBLL> .GetBLL("ShopUserBLL");

                var user = shopUserBll.GetEntity(u => u.Id == model.UserId && u.DelFlag == ConstantParam.DEL_FLAG_DEFAULT);
                if (user == null)
                {
                    resultModel.Msg = APIMessage.NO_USER;
                    return(resultModel);
                }
                //如果验证Token不通过或已过期
                if (DateTime.Now > user.TokenInvalidTime || model.Token != user.Token)
                {
                    resultModel.Msg = APIMessage.TOKEN_INVALID;
                    return(resultModel);
                }
                //更新最近登录时间和Token失效时间
                user.LatelyLoginTime  = DateTime.Now;
                user.TokenInvalidTime = DateTime.Now.AddDays(Convert.ToInt32(PropertyUtils.GetConfigParamValue("TokenInvalid")));
                shopUserBll.Update(user);

                //获取指定订单
                IOrderBLL orderBll = BLLFactory <IOrderBLL> .GetBLL("OrderBLL");

                var order = orderBll.GetEntity(o => o.Id == model.Id && o.DelFlag == ConstantParam.DEL_FLAG_DEFAULT && o.IsStoreHided == ConstantParam.DEL_FLAG_DEFAULT);
                if (order != null)
                {
                    resultModel.result = new
                    {
                        Id                                           = order.Id,
                        OrderNo                                      = order.OrderNo,
                        ShopName                                     = order.Shop.ShopName,
                        ShopPhone                                    = string.IsNullOrEmpty(order.Shop.Phone) ? "" : order.Shop.Phone,
                        OrderTime                                    = order.OrderDate.ToString("yyyy-MM-dd HH:mm:ss"),
                        OrderStatus                                  = order.OrderStatus,
                        Shipper                                      = order.ShippingAddress.ShipperName + "(" + order.ShippingAddress.Telephone + ")",
                        SendAddress                                  = order.ShippingAddress.County.City.Province.ProvinceName + order.ShippingAddress.County.City.CityName + order.ShippingAddress.County.CountyName + "  " + order.ShippingAddress.AddressDetails,
                        PayWay                                       = order.PayWay,
                        BuyUserName                                  = order.User.UserName,
                        BuyUserHeadPic                               = order.User.HeadPath,
                        BuyUserPhone                                 = order.User.Phone,
                        Memo                                         = order.Memo,
                        RecedeType                                   = order.RecedeType,
                        RemainingTime                                = order.PayDate == null || order.PayDate.Value.AddHours(2) < DateTime.Now ? "0小时0分" : (order.PayDate.Value.AddHours(2) - DateTime.Now).Hours + "小时" + (order.PayDate.Value.AddHours(2) - DateTime.Now).Minutes + "分",
                        ExitOrderReason                              = order.Reason,
                        RefundStatus                                 = GetRefundResult(order.Id),
                        RecedeTime                                   = order.RecedeTime != null?order.RecedeTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",
                                                          TotalPrice = Convert.ToDouble(Convert.ToDecimal(order.OrderDetails.Select(d => d.Price).ToArray().Sum())),
                                                          Freight    = Convert.ToDouble(Convert.ToDecimal(order.OrderPrice) - Convert.ToDecimal(order.OrderDetails.Select(d => d.Price).ToArray().Sum())),
                                                          GoodsList  = order.OrderDetails.Select(d => new
                        {
                            SaleName    = d.ShopSale.Title,
                            SaleImg     = string.IsNullOrEmpty(d.ShopSale.ImgThumbnail) ? "" : d.ShopSale.ImgThumbnail.Split(';')[0],
                            SaledAmount = d.SaledAmount,
                            Price       = Convert.ToDouble(Convert.ToDecimal(d.Price / d.SaledAmount))
                        })
                    };
                }
                else
                {
                    resultModel.Msg = "订单已不存在";
                }
            }
            catch
            {
                resultModel.Msg = APIMessage.REQUEST_EXCEPTION;
            }
            return(resultModel);
        }
Example #23
0
        public ApiPageResultModel OrderList([FromUri] OrderPagedSearchModel model)
        {
            ApiPageResultModel resultModel = new ApiPageResultModel();

            try
            {
                //获取当前商家用户
                IShopUserBLL shopUserBll = BLLFactory <IShopUserBLL> .GetBLL("ShopUserBLL");

                var user = shopUserBll.GetEntity(u => u.Id == model.UserId && u.DelFlag == ConstantParam.DEL_FLAG_DEFAULT);
                if (user != null)
                {
                    //如果验证Token不通过或已过期
                    if (DateTime.Now > user.TokenInvalidTime || model.Token != user.Token)
                    {
                        resultModel.Msg = APIMessage.TOKEN_INVALID;
                        return(resultModel);
                    }
                    //更新最近登录时间和Token失效时间
                    user.LatelyLoginTime  = DateTime.Now;
                    user.TokenInvalidTime = DateTime.Now.AddDays(Convert.ToInt32(PropertyUtils.GetConfigParamValue("TokenInvalid")));
                    shopUserBll.Update(user);
                    //如果该用户还未创建门店
                    if (user.Shops.Count < 1)
                    {
                        resultModel.Msg = APIMessage.SHOP_NOEXIST;
                        return(resultModel);
                    }
                    else
                    {
                        //获取订单列表数据
                        IOrderBLL orderBll = BLLFactory <IOrderBLL> .GetBLL("OrderBLL");

                        int shopId = user.Shops.FirstOrDefault().Id;
                        Expression <Func <T_Order, bool> > where = o => o.ShopId == shopId && o.DelFlag == ConstantParam.DEL_FLAG_DEFAULT && o.IsStoreHided == ConstantParam.DEL_FLAG_DEFAULT;
                        if (model.OrderStatus != null)
                        {
                            where = PredicateBuilder.And(where, o => o.OrderStatus == model.OrderStatus);
                        }
                        resultModel.result = orderBll.GetPageList(where, "OrderDate", false, model.PageIndex).Select(o => new
                        {
                            Id              = o.Id,
                            OrderNo         = o.OrderNo,
                            ShopId          = o.Shop.Id,
                            ShopName        = o.Shop.ShopName,
                            ShopImg         = string.IsNullOrEmpty(o.Shop.ImgThumbnail) ? "" : o.Shop.ImgThumbnail.Split(';')[0],
                            BuyUserName     = o.User.UserName,
                            BuyUserHeadPic  = o.User.HeadPath,
                            BuyUserPhone    = o.ShippingAddress.Telephone,
                            OrderTime       = o.OrderDate.ToString("yyyy-MM-dd HH:mm:ss"),
                            OrderStatus     = o.OrderStatus,
                            RecedeType      = o.RecedeType,
                            RemainingTime   = o.PayDate == null || o.PayDate.Value.AddHours(2) < DateTime.Now ? "0小时0分" : (o.PayDate.Value.AddHours(2) - DateTime.Now).Hours + "小时" + (o.PayDate.Value.AddHours(2) - DateTime.Now).Minutes + "分",
                            ExitOrderReason = o.Reason,
                            OrderPrice      = o.OrderPrice,
                            SendAddress     = o.ShippingAddress.County.City.Province.ProvinceName + o.ShippingAddress.County.City.CityName + o.ShippingAddress.County.CountyName + "  " + o.ShippingAddress.AddressDetails,
                            PayWay          = o.PayWay,
                            RefundStatus    = GetRefundResult(o.Id),
                            PayTradeNo      = o.PayTradeNo,
                            RecedeTime      = o.RecedeTime != null ? o.RecedeTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",
                            Memo            = string.IsNullOrEmpty(o.Memo) ? "" : o.Memo,
                        });
                        resultModel.Total = orderBll.Count(where);
                    }
                }
                else
                {
                    resultModel.Msg = APIMessage.NO_USER;
                }
            }
            catch
            {
                resultModel.Msg = APIMessage.REQUEST_EXCEPTION;
            }
            return(resultModel);
        }
Example #24
0
 public OrderController(IOrderBLL orderBLL)
 {
     OrderBLL = orderBLL;
 }
Example #25
0
        /// <summary>
        /// 获取退款结果数据
        /// </summary>
        /// <param name="OrderId">订单ID</param>
        /// <returns></returns>
        private string GetRefundResult(int OrderId)
        {
            string RefundResult = "";
            //获取订单数据
            IOrderBLL orderBll = BLLFactory <IOrderBLL> .GetBLL("OrderBLL");

            var order = orderBll.GetEntity(o => o.Id == OrderId);

            //如果已经生成了微信支付订单号且退单类型为退单退款
            if (!string.IsNullOrEmpty(order.PayTradeNo) && order.RecedeType == 2)
            {
                //如果是微信在线支付
                if (order.PayWay == 1)
                {
                    //获取商家账户信息
                    var wxAccount = order.Shop.ShopAccounts.Where(a => a.AccountType == ConstantParam.PROPERTY_ACCOUNT_WeChat).FirstOrDefault();
                    if (wxAccount != null)
                    {
                        //获取商家账户信息
                        string WeixinAppId  = wxAccount.Number;
                        string WeixinMchId  = wxAccount.MerchantNo;
                        string WeixinPayKey = wxAccount.AccountKey;

                        Random r = new Random();

                        #region 组装参数

                        //组装签名字符串
                        StringBuilder signStr = new StringBuilder();
                        //组装xml格式
                        StringBuilder varBody = new StringBuilder();

                        varBody.Append("<xml>");
                        //APP应用ID
                        varBody.Append("<appid>" + WeixinAppId + "</appid>");
                        signStr.Append("appid=" + WeixinAppId + "&");
                        //商户号
                        varBody.Append("<mch_id>" + WeixinMchId + "</mch_id>");
                        signStr.Append("mch_id=" + WeixinMchId + "&");
                        //随机字符串
                        string str       = "1234567890abcdefghijklmnopqrstuvwxyz";
                        string randomStr = "";
                        for (int i = 0; i < 32; i++)
                        {
                            randomStr = randomStr + str[r.Next(str.Length)].ToString();
                        }
                        varBody.Append("<nonce_str>" + randomStr + "</nonce_str>");
                        signStr.Append("nonce_str=" + randomStr + "&");

                        //支付订单号
                        varBody.Append("<out_trade_no>" + order.PayTradeNo + "</out_trade_no>");
                        signStr.Append("out_trade_no=" + order.PayTradeNo + "&");
                        //签名
                        signStr.Append("key=" + WeixinPayKey);
                        varBody.Append("<sign>" + PropertyUtils.GetMD5Str(signStr.ToString()).ToUpper() + "</sign>");
                        varBody.Append("</xml>");
                        #endregion

                        //发送HTTP POST请求
                        string url = "https://api.mch.weixin.qq.com/pay/refundquery";

                        HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
                        request.Method      = "POST";
                        request.ContentType = "text/xml";
                        // 信任证书
                        ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);

                        byte[] bytes = Encoding.UTF8.GetBytes(varBody.ToString());
                        request.ContentLength = bytes.Length;
                        using (Stream writer = request.GetRequestStream())
                        {
                            writer.Write(bytes, 0, bytes.Length);
                            writer.Flush();
                            writer.Close();
                        }
                        //处理返回结果
                        string          result   = null;
                        HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                        if (response.StatusCode == HttpStatusCode.OK)
                        {
                            using (StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8))
                            {
                                result = reader.ReadToEnd();
                                reader.Close();
                            }
                        }

                        //解析返回数据
                        XmlDocument doc = new XmlDocument();
                        doc.LoadXml(result);
                        string return_code = doc.GetElementsByTagName("return_code")[0].InnerText;
                        //如果返回成功
                        if (return_code == "SUCCESS")
                        {
                            string result_code = doc.GetElementsByTagName("result_code")[0].InnerText;
                            if (result_code == "SUCCESS")
                            {
                                String RefundStatus = doc.GetElementsByTagName("refund_status_0")[0].InnerText;
                                switch (RefundStatus)
                                {
                                case "SUCCESS":
                                    RefundResult = "退款成功";
                                    break;

                                case "FAIL":
                                    RefundResult = "退款失败";
                                    break;

                                case "PROCESSING":
                                    RefundResult = "退款处理中";
                                    break;

                                default:
                                    RefundResult = "退款失败";
                                    break;
                                }
                            }
                        }
                    }
                }
                //如果是支付宝在线支付
                else if (order.PayWay == 2)
                {
                    RefundResult = order.RefundResult;
                }
            }
            return(RefundResult);
        }
 public OrderController(OrderBLL stud)
 {
     _orderbll = stud;
 }
Example #27
0
        public static bool RejectOrders()
        {
            try
            {
                //CommonUtils.WriteLog("进入到RejectOrders方法内部");
                //调用定单接口
                IOrderBLL templateBLL = BLLFactory <IOrderBLL> .GetBLL("OrderBLL");

                var twoHourAgoTime = DateTime.Now.AddHours(-2);

                //找出所有超过2小时商家没有接单的
                var orders = templateBLL.GetList(o => o.OrderStatus == ConstantParam.OrderStatus_CONFIRM && o.PayDate < twoHourAgoTime).ToList();
                //CommonUtils.WriteLog("成功连接数据库成功");
                //修改订单状态为退单状态

                foreach (var order in orders)
                {
                    order.OrderStatus = ConstantParam.OrderStatus_EXIT;
                    order.RecedeType  = 1;
                    order.RecedeTime  = DateTime.Now;
                    order.Reason      = "商家2小时未接单,系统自动退单";
                    var alert = "您在" + order.Shop.ShopName + "提交的订单因商家2小时未接单已自动退单";

                    if (templateBLL.CancelOrder(order))
                    {
                        IUserPushBLL userPushBLL = BLLFactory <IUserPushBLL> .GetBLL("UserPushBLL");

                        var userPush = userPushBLL.GetEntity(p => p.UserId == order.AppUserId);

                        if (userPush != null)
                        {
                            string registrationId = userPush.RegistrationId;
                            //通知信息
                            PropertyUtils.SendPush("订单最新状态", alert, ConstantParam.MOBILE_TYPE_OWNER, registrationId);
                        }
                    }
                }

                var twoDayAgoTime = DateTime.Now.AddDays(-2);

                var end   = twoDayAgoTime.AddHours(2);
                var start = end.AddMinutes(-2);
                //获取所有提交订单超过46小时,且没有付款没有提醒的订单
                var noPayAndRemindOrders = templateBLL.GetList(o => o.OrderStatus == ConstantParam.OrderStatus_NOPAY && o.OrderDate < end && o.OrderDate >= start).ToList();
                foreach (var order in noPayAndRemindOrders)
                {
                    var          alert       = "您在" + order.Shop.ShopName + "提交的订单还未付款,2小时后订单会自动关闭";
                    IUserPushBLL userPushBLL = BLLFactory <IUserPushBLL> .GetBLL("UserPushBLL");

                    var userPush = userPushBLL.GetEntity(p => p.UserId == order.AppUserId);

                    if (userPush != null)
                    {
                        string registrationId = userPush.RegistrationId;
                        //通知信息
                        PropertyUtils.SendPush("订单最新状态", alert, ConstantParam.MOBILE_TYPE_OWNER, registrationId);
                    }
                }


                //获取所有提交订单超过2天,且没有付款的订单
                var noPayOrders = templateBLL.GetList(o => o.OrderStatus == ConstantParam.OrderStatus_NOPAY && o.OrderDate < twoDayAgoTime).ToList();
                foreach (var order in noPayOrders)
                {
                    order.OrderStatus = ConstantParam.OrderStatus_CLOSE;
                    var alert = "您在" + order.Shop.ShopName + "提交的订单因长时间不付款已自动关闭";

                    if (templateBLL.CancelOrder(order))
                    {
                        IUserPushBLL userPushBLL = BLLFactory <IUserPushBLL> .GetBLL("UserPushBLL");

                        var userPush = userPushBLL.GetEntity(p => p.UserId == order.AppUserId);

                        if (userPush != null)
                        {
                            string registrationId = userPush.RegistrationId;
                            //通知信息
                            PropertyUtils.SendPush("订单最新状态", alert, ConstantParam.MOBILE_TYPE_OWNER, registrationId);
                        }
                    }
                }
                return(true);
            }
            catch (Exception ex)
            {
                CommonUtils.WriteLogError(ex);
                return(false);
            }
        }
Example #28
0
        public ActionResult RecedeOrder(RecedeReasonModel model)
        {
            if (ModelState.IsValid)
            {
                IOrderBLL orderBll = BLLFactory <IOrderBLL> .GetBLL("OrderBLL");

                T_Order order = orderBll.GetEntity(o => o.Id == model.OrderId && o.DelFlag == ConstantParam.DEL_FLAG_DEFAULT && o.IsStoreHided == ConstantParam.DEL_FLAG_DEFAULT);

                if (order != null)
                {
                    string alert = "";
                    //如果订单状态为待收货
                    if (order.OrderStatus == ConstantParam.OrderStatus_RECEIPT)
                    {
                        //如果订单支付方式为微信在线支付
                        if (order.PayWay == 1)
                        {
                            //微信退款
                            //获取商家信息
                            var wxAccount = order.Shop.ShopAccounts.Where(a => a.AccountType == ConstantParam.PROPERTY_ACCOUNT_WeChat).FirstOrDefault();
                            if (wxAccount != null)
                            {
                                //获取商家账户信息
                                string WeixinAppId  = wxAccount.Number;
                                string WeixinMchId  = wxAccount.MerchantNo;
                                string WeixinPayKey = wxAccount.AccountKey;

                                //申请退款
                                string result = ApplyRefund(order, WeixinAppId, WeixinMchId, WeixinPayKey);
                                //如果请求失败
                                if (result == null)
                                {
                                    ModelState.AddModelError("OrderId", "订单退款申请失败");
                                    return(View(model));
                                }
                                //解析返回数据
                                XmlDocument doc = new XmlDocument();
                                doc.LoadXml(result);
                                string return_code = doc.GetElementsByTagName("return_code")[0].InnerText;

                                //如果返回成功
                                if (return_code == "SUCCESS")
                                {
                                    string result_code = doc.GetElementsByTagName("result_code")[0].InnerText;
                                    if (result_code == "SUCCESS")
                                    {
                                        order.RecedeType = 2;
                                    }
                                    else
                                    {
                                        ModelState.AddModelError("OrderId", "订单退款申请失败");
                                        return(View(model));
                                    }
                                }
                                else
                                {
                                    ModelState.AddModelError("OrderId", "订单退款申请失败");
                                    return(View(model));
                                }
                            }
                            else
                            {
                                ModelState.AddModelError("OrderId", "该订单所属商家未设置账户信息");
                                return(View(model));
                            }
                        }
                        //支付宝支付退款
                        else if (order.PayWay == 2)
                        {
                            order.Reason = model.Reason;
                            orderBll.Update(order);

                            var    r           = new Random();
                            string batch_no    = DateTime.Now.ToString("yyyyMMddHHmmssfff") + r.Next(1000);
                            string detail_data = order.PayTradeNo + "^" + order.OrderPrice + "^" + model.Reason;

                            //把请求参数打包成数组
                            SortedDictionary <string, string> sParaTemp = new SortedDictionary <string, string>();
                            sParaTemp.Add("service", Alipay.Config.service);
                            sParaTemp.Add("partner", Alipay.Config.partner);
                            sParaTemp.Add("_input_charset", Alipay.Config.input_charset.ToLower());
                            sParaTemp.Add("notify_url", PropertyUtils.GetConfigParamValue("HostUrl") + "/Common/AlipayRefundNotifyUrl");
                            sParaTemp.Add("seller_user_id", Alipay.Config.seller_user_id);
                            sParaTemp.Add("refund_date", Alipay.Config.refund_date);
                            sParaTemp.Add("batch_no", batch_no);
                            sParaTemp.Add("batch_num", "1");
                            sParaTemp.Add("detail_data", detail_data);

                            //建立请求
                            string html = Alipay.Submit.BuildRequest(sParaTemp, "get", "确定");
                            return(Content(html));
                        }
                        else
                        {
                            order.RecedeType = 0;
                        }
                    }
                    //订单状态为待确认
                    else if (order.OrderStatus == ConstantParam.OrderStatus_CONFIRM)
                    {
                        order.RecedeType = 0;
                    }

                    order.OrderStatus = ConstantParam.OrderStatus_EXIT;
                    order.Reason      = model.Reason;
                    order.RecedeTime  = DateTime.Now;
                    alert             = "您在" + order.Shop.ShopName + "提交的订单已被商家退单";

                    //如果退单成功
                    if (orderBll.CancelOrder(order))
                    {
                        //推送给订单所属用户
                        IUserPushBLL userPushBLL = BLLFactory <IUserPushBLL> .GetBLL("UserPushBLL");

                        var userPush = userPushBLL.GetEntity(p => p.UserId == order.AppUserId);
                        if (userPush != null)
                        {
                            string registrationId = userPush.RegistrationId;

                            //通知信息
                            PropertyUtils.SendPush("订单最新状态", alert, ConstantParam.MOBILE_TYPE_OWNER, registrationId);
                        }
                    }
                    return(RedirectToAction("OrderList"));
                }
                else
                {
                    return(RedirectToAction("OrderList"));
                }
            }
            else
            {
                ModelState.AddModelError("OrderId", ConstantParam.JSON_RESULT_MODEL_CHECK_ERROR);
                return(View(model));
            }
        }
 public OrderController(OrderBLL stud)
 {
     _orderbll = stud;
 }
 public OrderController()
 {
     _orderBLL = new OrderBLL();
 }
 public OrderController(IOrderBLL stub)
 {
     _orderBLL = stub;
 }
Example #32
0
 public OrderController(IGameBLL gameLogic, IOrderBLL orderLogic, IUserBLL userLogic)
 {
     _gameLogic  = gameLogic;
     _orderLogic = orderLogic;
     _userLogic  = userLogic;
 }