예제 #1
0
        public ActionResult ConfirmOrder()
        {
            var        loginUser  = (UserInfo)ViewBag.User;
            var        list       = _order.GetShoppingCar(loginUser);
            var        mj         = _active.CheckManjiujian(loginUser, ViewBag.ManagerId);
            Manjiusong ms         = _active.CheckManSong(loginUser, ViewBag.ManagerId);
            var        couponList = _active.FindCanUseCoupon(loginUser.UserId);
            var        dpses      = _active.CheckDPS(list, loginUser.TypeId, loginUser.AreaNum);

            dpses.ForEach(x =>
            {
                var model = _manager.GetGoodInfoById(x.SendGoodsId);
                if (model != null)
                {
                    x.SendGoodsNum = model.pic1;
                }
            });
            if (ms != null)
            {
                var msGoods = _manager.GetGoodInfoById(ms.SendGoodId);
                if (msGoods != null)
                {
                    ms.Tittle = msGoods.pic1;
                }
            }
            ViewBag.Mj   = mj;
            ViewBag.Ms   = ms;
            ViewBag.List = list;

            ViewBag.CouponList = couponList;
            ViewBag.DPSES      = dpses;

            return(View());
        }
예제 #2
0
        /// <summary>
        /// 获取可用的优惠卷
        /// </summary>
        /// <param name="method"></param>
        /// <returns></returns>
        public string CheckCanUseCoupon()
        {
            var loginUser = GetUserInfo();

            if (loginUser != null)
            {
                Guid managerId  = GetManagerId(loginUser);
                var  couponList = _active.FindCanUseCoupon(loginUser.UserId);
                _response.Result = couponList;
                _response.Stutas = true;
            }
            else
            {
                _response.Stutas = false;
                _response.Msg    = "请先登录";
            }
            string result = Utils.SerializeObject(_response);

            return(result);
        }