public BookNodeController( IUrlRecordService urlRecordService , IPermissionService permissionService , ICustomerActivityService customerActivityService , IEventPublisher eventPublisher , ILocalizationService localizationService // ,INotificationService notificationService , IBookDirService bookDirService , IBookDirFactory bookDirFactory , IProductModelFactory productModelFactory , IBookNodeFactory bookNodeFactory , IAiBookService bookNodeService ) { _urlRecordService = urlRecordService; _permissionService = permissionService; _customerActivityService = customerActivityService; _eventPublisher = eventPublisher; _localizationService = localizationService; // _notificationService = notificationService; _bookDirService = bookDirService; _bookDirFactory = bookDirFactory; _productModelFactory = productModelFactory; _bookNodeFactory = bookNodeFactory; _bookNodeService = bookNodeService; }
public BookNodeFactory( CaptchaSettings captchaSettings , CustomerSettings customerSettings , IAiBookService aiBookService , ICustomerService customerService , IDateTimeHelper dateTimeHelper , IGenericAttributeService genericAttributeService , IPictureService pictureService , IStaticCacheManager cacheManager , IStoreContext storeContext , IWorkContext workContext , ICategoryModelFactory categoryModelFactory , IBaseAdminModelFactory baseAdminModelFactory , MediaSettings mediaSettings , IProductService productService , IBookDirFactory bookdirFactory , IBookDirService bookdirService , ILocalizationService localizationService , ILocalizedModelFactory localizedModelFactory ) { _captchaSettings = captchaSettings; _customerSettings = customerSettings; _aiBookService = aiBookService; _customerService = customerService; _dateTimeHelper = dateTimeHelper; _genericAttributeService = genericAttributeService; _pictureService = pictureService; _cacheManager = cacheManager; _storeContext = storeContext; _workContext = workContext; _mediaSettings = mediaSettings; _categoryModelFactory = categoryModelFactory; _baseAdminModelFactory = baseAdminModelFactory; _bookDirFactory = bookdirFactory; _bookdirService = bookdirService; _localizationService = localizationService; _productService = productService; _localizedModelFactory = localizedModelFactory; }
public static List <SelectListItem> GetBookDirList(IBookDirService bookDirService, Customer customer = null, ICacheManager cacheManager = null, bool showHidden = false) { if (bookDirService == null) { throw new ArgumentNullException(nameof(bookDirService)); } if (cacheManager == null) { throw new ArgumentNullException(nameof(cacheManager)); } var cacheKey = string.Format(NopModelCacheDefaults.VendorsListKey, showHidden); var listItems = cacheManager.Get(cacheKey, () => { // var vendors = bookDirService.GetAllVendors(showHidden: showHidden); var vendors = bookDirService.GetAllBookDirs(); return(vendors.Select(v => new SelectListItem { Text = v.Name, Value = v.Id.ToString() })); }); var result = new List <SelectListItem>(); //clone the list to ensure that "selected" property is not set foreach (var item in listItems) { result.Add(new SelectListItem { Text = item.Text, Value = item.Value }); } return(result); }
/// <summary> /// 构造函数 /// </summary> public BookDirFactory(IBaseAdminModelFactory baseAdminModelFactory , IAclSupportedModelFactory aclSupportedModelFactory , ICategoryService categoryService , ICurrencyService currencyService , ICustomerService customerService , IDateTimeHelper dateTimeHelper , ILocalizationService localizationService , ILocalizedModelFactory localizedModelFactory , IManufacturerService manufacturerService , IMeasureService measureService , IStoreService storeService , IPictureService pictureService , IStoreMappingSupportedModelFactory storeMappingSupportedModelFactory , IWorkContext workContext , IBookDirService bookDirService , IProductService productService , IUrlRecordService urlRecordService) { _baseAdminModelFactory = baseAdminModelFactory; _aclSupportedModelFactory = aclSupportedModelFactory; _categoryService = categoryService; _currencyService = currencyService; _customerService = customerService; _dateTimeHelper = dateTimeHelper; _localizationService = localizationService; _localizedModelFactory = localizedModelFactory; _manufacturerService = manufacturerService; _measureService = measureService; _storeService = storeService; _pictureService = pictureService; _storeMappingSupportedModelFactory = storeMappingSupportedModelFactory; _workContext = workContext; _bookDirService = bookDirService; _urlRecordService = urlRecordService; _productService = productService; // _bookDirFactory = bookDirFactory; }
public AiBookService( IEventPublisher eventPublisher, IRepository <AiBookModel> bookNodeRepository, IRepository <StoreMapping> storeMappingRepository, IStaticCacheManager cacheManager, ILogger logger, IWorkContext workContext, CommonSettings commonSettings, IAclService aclService, IDataProvider dataProvider, IDbContext dbContext, ILocalizationService localizationService, IStaticCacheManager staticCacheManager, IStoreContext storeContext, ICategoryService cateservice, IProductService productService, IBookDirService bookDirService ) { _eventPublisher = eventPublisher; _bookNodeRepository = bookNodeRepository; _storeMappingRepository = storeMappingRepository; _cacheManager = cacheManager; _logger = logger; _workContext = workContext; _commonSettings = commonSettings; _aclService = aclService; _dataProvider = dataProvider; _dbContext = dbContext; _localizationService = localizationService; _staticCacheManager = staticCacheManager; _storeContext = storeContext; _cateservice = cateservice; _productService = productService; _bookDirService = bookDirService; }