コード例 #1
0
 public MemberController(
     IOrderService iOrderService,
     IMemberService iMemberService,
     IMemberCapitalService iMemberCapitalService,
     ICouponService iCouponService,
     IShopBonusService iShopBonusService,
     IVShopService iVShopService,
     IProductService iProductService,
     IShippingAddressService iShippingAddressService,
     IMessageService iMessageService,
     IDistributionService iDistributionService,
     IMemberSignInService iMemberSignInService,
     IRefundService iRefundService,
     ICommentService iCommentService
     )
 {
     _iOrderService           = iOrderService;
     _iMemberService          = iMemberService;
     _iMemberCapitalService   = iMemberCapitalService;
     _iCouponService          = iCouponService;
     _iShopBonusService       = iShopBonusService;
     _iVShopService           = iVShopService;
     _iProductService         = iProductService;
     _iShippingAddressService = iShippingAddressService;
     _iMessageService         = iMessageService;
     _iMemberSignInService    = iMemberSignInService;
     _iDistributionService    = iDistributionService;
     _iRefundService          = iRefundService;
     _iCommentService         = iCommentService;
 }
コード例 #2
0
 public OrderRefundController(IOrderService iOrderService, IRefundService iRefundService, IShopService iShopService, IVShopService iVShopService)
 {
     _iOrderService  = iOrderService;
     _iRefundService = iRefundService;
     _iShopService   = iShopService;
     _iVShopService  = iVShopService;
 }
コード例 #3
0
ファイル: CartController.cs プロジェクト: sky63886/Himall3.3
 public CartController(IProductService iProductService, IShopService iShopService, IVShopService iVShopService, IShopBranchService iShopBranchService)
 {
     _iProductService    = iProductService;
     _iShopService       = iShopService;
     _iVShopService      = iVShopService;
     _iShopBranchService = iShopBranchService;
 }
コード例 #4
0
 public BranchCartController()
 {
     _iShopBranchService = new ShopBranchService();
     _iCartService       = new CartService();
     _iProductService    = new ProductService();
     _iBranchCartService = new BranchCartService();
     _iShopService       = ServiceProvider.Instance <IShopService> .Create;
     _iVShopService      = new VShopService();
 }
コード例 #5
0
 public BranchCartController()
 {
     this._iShopBranchService = (IShopBranchService) new ShopBranchService();
     this._iCartService       = (ICartService) new CartService();
     this._iProductService    = (IProductService) new ProductService();
     this._iBranchCartService = (IBranchCartService) new BranchCartService();
     this._iShopService       = (IShopService) new ShopService();
     this._iVShopService      = (IVShopService) new VShopService();
 }
コード例 #6
0
 public BranchCartController()
 {
     _iShopBranchService = new ShopBranchService();
     _iCartService       = new CartService();
     _iProductService    = new ProductService();
     _iBranchCartService = new BranchCartService();
     _iShopService       = new ShopService();
     _iVShopService      = new VShopService();
 }
コード例 #7
0
 public PortfolioBuyController(IShopService iShopService, IVShopService iVShopService, IProductService iProductService,
                               ICashDepositsService iCashDepositsService, IFreightTemplateService iFreightTemplateService, IRegionService iRegionService
                               )
 {
     _iShopService            = iShopService;
     _iVShopService           = iVShopService;
     _iProductService         = iProductService;
     _iCashDepositsService    = iCashDepositsService;
     _iFreightTemplateService = iFreightTemplateService;
     _iRegionService          = iRegionService;
 }
コード例 #8
0
        public WeiXinController(IVShopService iVShopService,
                                IWeixinMenuService iWeixinMenuService,
                                IMobileHomeTopicService iMobileHomeTopicService,
                                ITopicService iTopicService)

        {
            _iVShopService           = iVShopService;
            _iWeixinMenuService      = iWeixinMenuService;
            _iMobileHomeTopicService = iMobileHomeTopicService;
            _iTopicService           = iTopicService;
        }
コード例 #9
0
 public GiftsController(IProductService iProductService, ITypeService iTypeService
                        , IGiftService iGiftService, ICouponService iCouponService, IVShopService iVShopService
                        , IGiftsOrderService iGiftsOrderService, IMemberGradeService iMemberGradeService)
 {
     _iProductService     = iProductService;
     _iTypeService        = iTypeService;
     _iGiftService        = iGiftService;
     _iCouponService      = iCouponService;
     _iVShopService       = iVShopService;
     _iGiftsOrderService  = iGiftsOrderService;
     _iMemberGradeService = iMemberGradeService;
 }
コード例 #10
0
 public CouponController(ICouponService iCouponService,
                         IVShopService iVShopService,
                         IShopService iShopService,
                         IShopBonusService iShopBonusService,
                         IMemberService iMemberService
                         )
 {
     _iCouponService    = iCouponService;
     _iShopService      = iShopService;
     _iVShopService     = iVShopService;
     _iShopBonusService = iShopBonusService;
     _iMemberService    = iMemberService;
 }
コード例 #11
0
 public VShopController(IVShopService iVShopService,
                        ISlideAdsService iSlideAdsService,
                        INavigationService iNavigationService,
                        ICouponService iCouponService,
                        ITemplateSettingsService iTemplateSettingsService
                        )
 {
     _iVShopService            = iVShopService;
     _iSlideAdsService         = iSlideAdsService;
     _iNavigationService       = iNavigationService;
     _iCouponService           = iCouponService;
     _iTemplateSettingsService = iTemplateSettingsService;
 }
コード例 #12
0
 // Methods
 public LimitTimeBuyController(IShopCategoryService iShopCategoryService, ILimitTimeBuyService iLimitTimeBuyService, IShopService iShopService, IProductService iProductService, ICommentService iCommentService, IVShopService iVShopService, IConsultationService iConsultationService, IProductDescriptionTemplateService iProductDescriptionTemplateService, ICustomerService iCustomerService, ITypeService iTypeService)
 {
     this._iShopCategoryService = iShopCategoryService;
     this._iLimitTimeBuyService = iLimitTimeBuyService;
     this._iShopService         = iShopService;
     this._iProductService      = iProductService;
     this._iCommentService      = iCommentService;
     this._iVShopService        = iVShopService;
     this._iProductDescriptionTemplateService = iProductDescriptionTemplateService;
     this._iConsultationService = iConsultationService;
     this._iCustomerService     = iCustomerService;
     this._iTypeService         = iTypeService;
 }
コード例 #13
0
        public ActionResult Management()
        {
            ICouponService couponService = ServiceHelper.Create <ICouponService>();
            IVShopService  vShopService  = ServiceHelper.Create <IVShopService>();
            IQueryable <UserCouponInfo> userCouponList = couponService.GetUserCouponList(base.CurrentUser.Id);
            List <ShopBonusReceiveInfo> detailByUserId = ServiceHelper.Create <IShopBonusService>().GetDetailByUserId(base.CurrentUser.Id);

            if (userCouponList == null && detailByUserId == null)
            {
                throw new HimallException("没有领取记录!");
            }
            IEnumerable <UserCouponInfo> array =
                from a in userCouponList.ToArray()
                select new UserCouponInfo()
            {
                UserId      = a.UserId,
                ShopId      = a.ShopId,
                CouponId    = a.CouponId,
                Price       = a.Price,
                PerMax      = a.PerMax,
                OrderAmount = a.OrderAmount,
                Num         = a.Num,
                StartTime   = a.StartTime,
                EndTime     = a.EndTime,
                CreateTime  = a.CreateTime,
                CouponName  = a.CouponName,
                UseStatus   = a.UseStatus,
                UseTime     = a.UseTime,
                VShop       = vShopService.GetVShopByShopId(a.ShopId)
            };
            int num = array.Count((UserCouponInfo item) => {
                if (item.EndTime <= DateTime.Now)
                {
                    return(false);
                }
                return(item.UseStatus == CouponRecordInfo.CounponStatuses.Unuse);
            });
            int num1 = detailByUserId.Count((ShopBonusReceiveInfo p) => {
                if (p.State == ShopBonusReceiveInfo.ReceiveState.NotUse)
                {
                    return(true);
                }
                return(p.ChemCloud_ShopBonusGrant.ChemCloud_ShopBonus.BonusDateEnd < DateTime.Now);
            });

            ViewBag.NoUseCount = num + num1;
            ViewBag.UserCount  = userCouponList.Count() - num + (detailByUserId.Count() - num1);
            ViewBag.ShopBonus  = detailByUserId;
            return(View(array));
        }
コード例 #14
0
ファイル: SearchController.cs プロジェクト: redpanda321/Mall
 public SearchController(
     IVShopService iVShopService,
     IProductService iProductService,
     ILimitTimeBuyService iLimitTimeBuyService,
     ISearchProductService iSearchProductService,
     ICategoryService iCategoryService
     )
 {
     _iVShopService         = iVShopService;
     _iProductService       = iProductService;
     _iLimitTimeBuyService  = iLimitTimeBuyService;
     _iSearchProductService = iSearchProductService;
     _iCategoryService      = iCategoryService;
 }
コード例 #15
0
 public AppController(IVShopService iVShopService,
                      ISlideAdsService iSlideAdsService,
                      INavigationService iNavigationService,
                      ICouponService iCouponService,
                      ITemplateSettingsService iTemplateSettingsService
                      )
 {
     _iVShopService            = iVShopService;
     _iSlideAdsService         = iSlideAdsService;
     _iNavigationService       = iNavigationService;
     _iCouponService           = iCouponService;
     _iTemplateSettingsService = iTemplateSettingsService;
     mobileHomeproduct         = new MobileHomeProducts();
 }
コード例 #16
0
ファイル: ShopApplication.cs プロジェクト: sky63886/Himall3.3
        /// <summary>
        /// 店铺名称修改了同时修改其他表保存店铺的名称
        /// </summary>
        /// <param name="shopId"></param>
        /// <param name="shopName"></param>
        /// <returns></returns>
        public static bool UpdateOtherTableShopName(long shopId, string shopName)
        {
            IVShopService  _iVShopService  = ObjectContainer.Current.Resolve <IVShopService>();
            ICouponService _iCouponService = ObjectContainer.Current.Resolve <ICouponService>();
            var            vshop           = _iVShopService.GetVShopByShopId(shopId);

            if (vshop != null)
            {
                vshop.Name = shopName;
                _iVShopService.UpdateVShop(vshop);
            }

            _iCouponService.SetCouponShopName(shopId, shopName);
            return(true);
        }
コード例 #17
0
 public ShopBonusController(IShopBonusService iShopBonusService,
                            IWXCardService iWXCardService,
                            IVShopService iVShopService,
                            IShopService iShopService
                            )
 {
     this._siteSetting = CurrentSiteSetting;
     if (string.IsNullOrWhiteSpace(this._siteSetting.WeixinAppId) || string.IsNullOrWhiteSpace(this._siteSetting.WeixinAppSecret))
     {
         throw new HimallException("未配置公众号参数");
     }
     this._bonusService   = iShopBonusService;
     this._iWXCardService = iWXCardService;
     _iVShopService       = iVShopService;
     _iShopService        = iShopService;
 }
コード例 #18
0
 public WXApiController(
     IWXCardService iWXCardService,
     IBonusService iBonusService,
     IVShopService iVShopService,
     IWXApiService iWXApiService,
     ILimitTimeBuyService iLimitTimeBuyService,
     IWXMsgTemplateService iWXMsgTemplateService
     )
 {
     _iWXCardService        = iWXCardService;
     _iBonusService         = iBonusService;
     _iVShopService         = iVShopService;
     _iWXApiService         = iWXApiService;
     _iLimitTimeBuyService  = iLimitTimeBuyService;
     _iWXMsgTemplateService = iWXMsgTemplateService;
 }
コード例 #19
0
        public ShopBonusController(IShopBonusService iShopBonusService,
                                   IWXCardService iWXCardService,
                                   IVShopService iVShopService,
                                   IShopService iShopService
                                   )
        {
            var settings = SiteSettingApplication.SiteSettings;

            if (string.IsNullOrWhiteSpace(settings.WeixinAppId) || string.IsNullOrWhiteSpace(settings.WeixinAppSecret))
            {
                throw new MallException("未配置公众号参数");
            }
            this._bonusService   = iShopBonusService;
            this._iWXCardService = iWXCardService;
            _iVShopService       = iVShopService;
            _iShopService        = iShopService;
        }
コード例 #20
0
        /// <summary>
        /// 取积分优惠券
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public object GetIntegralCoupon(int page = 1, int pagesize = 10)
        {
            var           _iCouponService       = ServiceProvider.Instance <ICouponService> .Create;
            IVShopService _iVShopService        = ServiceProvider.Instance <IVShopService> .Create;
            QueryPageModel <CouponInfo> coupons = _iCouponService.GetIntegralCoupons(page, pagesize);

            Mapper.CreateMap <CouponInfo, CouponGetIntegralCouponModel>();
            QueryPageModel <CouponGetIntegralCouponModel> result = new QueryPageModel <CouponGetIntegralCouponModel>();

            result.Total = coupons.Total;
            if (result.Total > 0)
            {
                var datalist = coupons.Models.ToList();
                var objlist  = new List <CouponGetIntegralCouponModel>();
                foreach (var item in datalist)
                {
                    var tmp = Mapper.Map <CouponGetIntegralCouponModel>(item);
                    tmp.ShowIntegralCover = Core.HimallIO.GetRomoteImagePath(item.IntegralCover);
                    var vshopobj = _iVShopService.GetVShopByShopId(tmp.ShopId);
                    if (vshopobj != null)
                    {
                        tmp.VShopId = vshopobj.Id;
                        //优惠价封面为空时,取微店Logo,微店Logo为空时,取商城微信Logo
                        if (string.IsNullOrWhiteSpace(tmp.ShowIntegralCover))
                        {
                            if (!string.IsNullOrWhiteSpace(vshopobj.WXLogo))
                            {
                                tmp.ShowIntegralCover = Core.HimallIO.GetRomoteImagePath(vshopobj.WXLogo);
                            }
                        }
                    }
                    if (string.IsNullOrWhiteSpace(tmp.ShowIntegralCover))
                    {
                        var siteset = SiteSettingApplication.SiteSettings;
                        tmp.ShowIntegralCover = Core.HimallIO.GetRomoteImagePath(siteset.WXLogo);
                    }
                    objlist.Add(tmp);
                }
                result.Models = objlist.ToList();
            }
            dynamic _result = SuccessResult();

            _result.Models = result.Models;
            _result.total  = result.Total;
            return(_result);
        }
コード例 #21
0
        public WXApiController(
            ISiteSettingService iSiteSettingService,
            IWXCardService iWXCardService,
            IBonusService iBonusService,
            IVShopService iVShopService,
            IWXApiService iWXApiService,
            ILimitTimeBuyService iLimitTimeBuyService
            )
        {
            _iSiteSettingService = iSiteSettingService;
            _iWXCardService = iWXCardService;
            _iBonusService = iBonusService;
            _iVShopService = iVShopService;
            _iWXApiService = iWXApiService;
            _iLimitTimeBuyService = iLimitTimeBuyService;

        }
コード例 #22
0
 public TemplateVisualizationAjaxController(
     IBonusService iBonusService,
     ITopicService iTopicService,
     ICouponService iCouponService,
     ILimitTimeBuyService iLimitTimeBuyService,
     IProductService iProductService,
     IPhotoSpaceService iPhotoSpaceService,
     IVShopService iVShopService)
 {
     _iBonusService        = iBonusService;
     _iTopicService        = iTopicService;
     _iCouponService       = iCouponService;
     _iLimitTimeBuyService = iLimitTimeBuyService;
     _iProductService      = iProductService;
     _iPhotoSpaceService   = iPhotoSpaceService;
     _iVShopService        = iVShopService;
 }
コード例 #23
0
        private void AddVshopBuyNumber(IEnumerable <long> orderIds)
        {
            IEnumerable <long> source       = Enumerable.Select <OrderInfo, long>((IEnumerable <OrderInfo>)Instance <IOrderService> .Create.GetOrders(orderIds), (Func <OrderInfo, long>)(item => item.ShopId));
            IVShopService      vshopService = Instance <IVShopService> .Create;

            foreach (long vshopId in Enumerable.Where <long>(Enumerable.Select <long, long>(source, (Func <long, long>)(item =>
            {
                VShopInfo vshopByShopId = vshopService.GetVShopByShopId(item);
                if (vshopByShopId != null)
                {
                    return(vshopByShopId.Id);
                }
                return(0L);
            })), (Func <long, bool>)(item => item > 0L)))
            {
                vshopService.AddBuyNumber(vshopId);
            }
        }
コード例 #24
0
 public ShopController(ICouponService iCouponService, IShopService iShopService, IShopCategoryService iShopCategoryService, IVShopService iVShopService
                       , IShopHomeModuleService iShopHomeModuleService, IRegionService iRegionService, INavigationService iNavigationService, ISlideAdsService iSlideAdsService
                       , IProductService iProductService,
                       IMemberService iMemberService,
                       ISearchProductService iSearchProductService
                       )
 {
     _iCouponService         = iCouponService;
     _iShopService           = iShopService;
     _iShopCategoryService   = iShopCategoryService;
     _iVShopService          = iVShopService;
     _iShopHomeModuleService = iShopHomeModuleService;
     _iRegionService         = iRegionService;
     _iNavigationService     = iNavigationService;
     _iSlideAdsService       = iSlideAdsService;
     _iProductService        = iProductService;
     _iMemberService         = iMemberService;
     _iSearchProductService  = iSearchProductService;
 }
コード例 #25
0
        public ShakeAroundController(IVShopService iVShopService, IShakeAroundService iShakeAroundService, IPoiService iPoiService)
        {
            var _ivshop = iVShopService;

            if (CurrentSellerManager != null)
            {
                this._settings            = _ivshop.GetVShopSetting(CurrentSellerManager.ShopId);
                this._iShakeAroundService = iShakeAroundService;
                this._iPoiService         = iPoiService;
                try
                {
                    this._iShakeAroundService.init(this._settings.AppId, this._settings.AppSecret);
                    this._iPoiService.init(this._settings.AppId, this._settings.AppSecret);
                }
                catch
                {
                    this._isdeploy = false;
                }
            }
        }
コード例 #26
0
 public PoiController(IPoiService iPoiService, IVShopService iVShopService)
 {
     _iVShopService = iVShopService;
     if (CurrentSellerManager != null)
     {
         this._settings = _iVShopService.GetVShopSetting(CurrentSellerManager.ShopId);
         if (this._settings != null)
         {
             this._iPoiService = iPoiService;
             try
             {
                 this._iPoiService.init(this._settings.AppId, this._settings.AppSecret);
             }
             catch
             {
                 this._isdeploy = false;
             }
         }
     }
 }
コード例 #27
0
        private void AddVshopBuyNumber(IEnumerable <long> orderIds)
        {
            IEnumerable <long> orders =
                from item in ServiceHelper.Create <IOrderService>().GetOrders(orderIds)
                select item.ShopId;
            IVShopService      vShopService = ServiceHelper.Create <IVShopService>();
            IEnumerable <long> nums         = orders.Select <long, long>((long item) => {
                VShopInfo vShopByShopId = vShopService.GetVShopByShopId(item);
                if (vShopByShopId != null)
                {
                    return(vShopByShopId.Id);
                }
                return(0);
            }).Where((long item) => item > 0);

            foreach (long num in nums)
            {
                vShopService.AddBuyNumber(num);
            }
        }
コード例 #28
0
 public BranchOrderController()
 {
     _iOrderService = new OrderService();
     _iCartService = new CartService();
     _iMemberService = new MemberService();
     _iProductService = new ProductService();
     _iPaymentConfigService = new PaymentConfigService();
     _iCashDepositsService = new CashDepositsService();
     _iShopService = ServiceProvider.Instance<IShopService>.Create;
     _iLimitTimeBuyService = new LimitTimeBuyService();
     _iCouponService = new CouponService();
     _iShopBonusService = new ShopBonusService();
     _iCollocationService = new CollocationService();
     _iMemberCapitalService = new MemberCapitalService();
     _iShippingAddressService = new ShippingAddressService();
     _iMemberIntegralService = new MemberIntegralService();
     _iRegionService = new RegionService();
     _iVShopService = new VShopService();
     _iRefundService = new RefundService();
     _iFightGroupService = new FightGroupService();
 }
コード例 #29
0
ファイル: CartController.cs プロジェクト: giagiigi/ChemCloud
        public JsonResult GetCartProducts()
        {
            ShoppingCartInfo cart           = (new CartHelper()).GetCart(base.CurrentUser.Id);
            IProductService  productService = ServiceHelper.Create <IProductService>();
            IShopService     shopService    = ServiceHelper.Create <IShopService>();
            IVShopService    vShopService   = ServiceHelper.Create <IVShopService>();
            var collection = cart.Items.Select((ShoppingCartItem item) => {
                ProductInfo product = productService.GetProduct(item.ProductId);
                ShopInfo shop       = shopService.GetShop(product.ShopId, false);
                if (shop == null)
                {
                    return(null);
                }
                VShopInfo vShopByShopId = vShopService.GetVShopByShopId(shop.Id);
                SKUInfo sku             = productService.GetSku(item.SkuId);
                return(new { cartItemId = item.Id, skuId = item.SkuId, id = product.Id, imgUrl = string.Concat(product.ImagePath, "/1_50.png"), name = product.ProductName, price = sku.SalePrice, count = item.Quantity, shopId = shop.Id, vshopId = (vShopByShopId == null ? 0 : vShopByShopId.Id), shopName = shop.ShopName, shopLogo = (vShopByShopId == null ? "" : vShopByShopId.Logo), status = (product.AuditStatus != ProductInfo.ProductAuditStatus.Audited || product.SaleStatus != ProductInfo.ProductSaleStatus.OnSale ? 0 : 1) });
            }).OrderBy((s) => s.vshopId);
            var variable = new { products = collection, amount = collection.Sum((item) => item.price * item.count), totalCount = collection.Sum((item) => item.count) };

            return(Json(variable));
        }
コード例 #30
0
 public BranchOrderController()
 {
     this._iOrderService           = (IOrderService) new OrderService();
     this._iCartService            = (ICartService) new CartService();
     this._iMemberService          = (IMemberService) new MemberService();
     this._iProductService         = (IProductService) new ProductService();
     this._iPaymentConfigService   = (IPaymentConfigService) new PaymentConfigService();
     this._iCashDepositsService    = (ICashDepositsService) new CashDepositsService();
     this._iSiteSettingService     = (ISiteSettingService) new SiteSettingService();
     this._iShopService            = (IShopService) new ShopService();
     this._iLimitTimeBuyService    = (ILimitTimeBuyService) new LimitTimeBuyService();
     this._iCouponService          = (ICouponService) new CouponService();
     this._iShopBonusService       = (IShopBonusService) new ShopBonusService();
     this._iCollocationService     = (ICollocationService) new CollocationService();
     this._iMemberCapitalService   = (IMemberCapitalService) new MemberCapitalService();
     this._iShippingAddressService = (IShippingAddressService) new ShippingAddressService();
     this._iMemberIntegralService  = (IMemberIntegralService) new MemberIntegralService();
     this._iRegionService          = (IRegionService) new RegionService();
     this._iVShopService           = (IVShopService) new VShopService();
     this._iRefundService          = (IRefundService) new RefundService();
     this._iFightGroupService      = (IFightGroupService) new FightGroupService();
 }