public MpMediaArticlesController(IMpMediaArticleAppService mpMediaArticleAppService,
                                         IUserMpAppService userMpAppService,
                                         IHostingEnvironment host,
                                         IWxMediaUpload wxMediaUpload,
                                         IFileServer fileServer
                                         , IMpMediaImageAppService mpMediaImageAppService
                                         , IWebUrlService webUrlService
                                         , IMatialFileService matialFileService
                                         , IMpAccountAppService mpAccountAppService
                                         , IMpUserMemberAppService mpUserMemberAppService
                                         , IWxMediaAppService wxMediaAppService)

        {
            _mpMediaArticleAppService = mpMediaArticleAppService;
            _userMpAppService         = userMpAppService;
            _host                   = host;
            _wxMediaUpload          = wxMediaUpload;
            _fileServer             = fileServer;
            _mpMediaImageAppService = mpMediaImageAppService;
            _webUrlService          = webUrlService;
            _matialFileService      = matialFileService;
            _mpAccountAppService    = mpAccountAppService;
            _mpUserMemberAppService = mpUserMemberAppService;
            _wxMediaAppService      = wxMediaAppService;
        }
        public MCServiceHandler(int mpId,
                                MpAccountDto account,
                                ICacheManager cacheManager,
                                ILogger logger,
                                IAccessTokenContainer accessTokenContainer
                                , IMatialFileService matialFileService
                                , IWebUrlService webUrlService
                                , IYiliBabyClubInterfaceService yiliBabyClubInterfaceService)
        {
            _cacheManager                 = cacheManager;
            _logger                       = logger;
            mpid                          = mpId;
            _account                      = account;
            _accessTokenContainer         = accessTokenContainer;
            _matialFileService            = matialFileService;
            _webUrlService                = webUrlService;
            _yiliBabyClubInterfaceService = yiliBabyClubInterfaceService;

            MamaBanToYun2OneMediaID = _matialFileService.MaMaBanToYun2One;
            JNHToLongLineMediaID    = _matialFileService.JNHToLongLine;
            wxOnlineUrl             = _webUrlService.GetSiteRootAddress() + _matialFileService.WxOnlineUrl;
            auth2Url = _webUrlService.GetSiteRootAddress() + _matialFileService.Auth2Url;

            defaultUserName = _yiliBabyClubInterfaceService.ApiUserName;
            defaultUserPwd  = _yiliBabyClubInterfaceService.ApiPassword;
            deviceCode      = _yiliBabyClubInterfaceService.ApiDeviceCode;
            yiliwechat      = _yiliBabyClubInterfaceService.Yiliwechat;
        }
 public LocalFileServer(IAppFolders appFolders, IWebUrlService webUrlService, ILogger _Logger, IMatialFileService matialFileService)
 {
     _appFolders        = appFolders;
     _webUrlService     = webUrlService;
     fileDownloadUrl    = webUrlService.GetRemotingFileDownloadUrl();
     Logger             = _Logger;
     _matialFileService = matialFileService;
     filePath           = _matialFileService.MapDirPath;
 }
Beispiel #4
0
 public CustomerServiceOnlinesController(ICustomerServiceOnlineAppService CustomerServiceOnlineAppService, IUserMpAppService userMpAppService, IMpAccountAppService mpAccountAppService, IFileServer fileServer, IWxMediaUpload wxMediaUpload,
                                         IWxMediaAppService wxMediaAppService, IWebUrlService webUrlService, IMatialFileService matialFileService)
 {
     _CustomerServiceOnlineAppService = CustomerServiceOnlineAppService;
     _userMpAppService    = userMpAppService;
     _mpAccountAppService = mpAccountAppService;
     _fileServer          = fileServer;
     _wxMediaUpload       = wxMediaUpload;
     _wxMediaAppService   = wxMediaAppService;
     _webUrlService       = webUrlService;
     _matialFileService   = matialFileService;
 }
 public MpCallbackController(IAccessTokenContainer accessTokenContainer
                             , ICacheManager cacheManager
                             , IMpAccountAppService mpAccountAppService
                             , IMpApiTokenAppService mpApiTokenAppService
                             , IMpEventAppService mpEventAppService
                             , IMpEventClickViewLogAppService mpEventClickViewLogAppService
                             , IMpEventRequestMsgLogAppService mpEventRequestMsgLogAppService
                             , IMpEventScanLogAppService mpEventScanLogAppService
                             , IMpFanAppService mpFanAppService
                             , IMpKeyWordReplyAppService mpKeyWordReplyAppService
                             , IMpMessageAppService mpMessageAppService
                             , IMpMenuAppService mpMenuAppService
                             , IMpMediaVideoAppService mpMediaVideoAppService
                             , IMpSelfArticleAppService mpSelfArticleAppService
                             , IMpSelfArticleGroupAppService mpSelfArticleGroupAppService
                             , IWebUrlService webUrlService
                             , IMpSelfArticleGroupItemAppService mpSelfArticleGroupItemAppService
                             , ICustomerServiceResponseTextAppService customerServiceResponseTextAppService
                             , IMpUserMemberAppService mpUserMemberAppService
                             , IMpChannelAppService mpChannelAppService
                             , IIocResolver iocResolver
                             , IMatialFileService matialFileService
                             , IYiliBabyClubInterfaceService yiliBabyClubInterfaceService
                             )
 {
     _accessTokenContainer                  = accessTokenContainer;
     ClientInfoProvider                     = NullClientInfoProvider.Instance;
     _cacheManager                          = cacheManager;
     _mpAccountAppService                   = mpAccountAppService;
     _mpApiTokenAppService                  = mpApiTokenAppService;
     _mpEventAppService                     = mpEventAppService;
     _mpEventClickViewLogAppService         = mpEventClickViewLogAppService;
     _mpEventRequestMsgLogAppService        = mpEventRequestMsgLogAppService;
     _mpEventScanLogAppService              = mpEventScanLogAppService;
     _mpFanAppService                       = mpFanAppService;
     _mpKeyWordReplyAppService              = mpKeyWordReplyAppService;
     _mpMenuAppService                      = mpMenuAppService;
     _mpMessageAppService                   = mpMessageAppService;
     _mpMediaVideoAppService                = mpMediaVideoAppService;
     _mpSelfArticleAppService               = mpSelfArticleAppService;
     _mpSelfArticleGroupAppService          = mpSelfArticleGroupAppService;
     _webUrlService                         = webUrlService;
     _mpSelfArticleGroupItemAppService      = mpSelfArticleGroupItemAppService;
     _customerServiceResponseTextAppService = customerServiceResponseTextAppService;
     _mpUserMemberAppService                = mpUserMemberAppService;
     _mpChannelAppService                   = mpChannelAppService;
     _iocResolver                  = iocResolver;
     _matialFileService            = matialFileService;
     _yiliBabyClubInterfaceService = yiliBabyClubInterfaceService;
 }
 public MapDirFileServer(IAppFolders appFolders, IWebUrlService webUrlService, ILogger _Logger, IMatialFileService matialFileService)
 {
     _appFolders        = appFolders;
     _webUrlService     = webUrlService;
     fileDownloadUrl    = webUrlService.GetRemotingFileDownloadUrl();
     Logger             = _Logger;
     _matialFileService = matialFileService;
     filePath           = _matialFileService.MapDirRemotingName;
     mapDirPath         = _matialFileService.MapDirPath;
     mapDirPwd          = _matialFileService.MapDirPwd;
     mapDirRemotingName = _matialFileService.MapDirRemotingName;
     mapDirRemotingIP   = _matialFileService.MapDirRemotingIP;
     mapDirUserName     = _matialFileService.MapDirUserName;
 }
Beispiel #7
0
 public UploadController(IAppFolders appFolders, ICacheManager cacheManager, IMpMediaImageAppService mpMediaImageAppService, IUserMpAppService userMpAppService, IMpAccountAppService mpAccountAppService, IAccessTokenContainer accessTokenContainer, IWxMediaAppService wxMediaAppService, IMpMediaVideoAppService mpMediaVideoAppService, IMpMediaVoiceAppService mpMediaVoiceAppService,
                         IMatialFileService matialFileService)
 {
     _appFolders             = appFolders;
     _cacheManager           = cacheManager;
     _mpMediaImageAppService = mpMediaImageAppService;
     _userMpAppService       = userMpAppService;
     _mpAccountAppService    = mpAccountAppService;
     _accessTokenContainer   = accessTokenContainer;
     _wxMediaAppService      = wxMediaAppService;
     _mpMediaVideoAppService = mpMediaVideoAppService;
     _mpMediaVoiceAppService = mpMediaVoiceAppService;
     _matialFileService      = matialFileService;
 }
Beispiel #8
0
        public MeiChiController(ICacheManager cacheManager, IMpUserMemberAppService mpUserMemberAppService, IMpBabyTextAppService mpBabyTextAppService, IMpShoppingMallPicAppService mpShoppingMallPicAppService, IMpFanAppService mpFanAppService, IAccessTokenContainer accessTokenContainer, IMpApiTokenAppService mpApiTokenAppService, IMatialFileService matialFileService, IYiliBabyClubInterfaceService yiliBabyClubInterfaceService, IMpProductInfoAppService mpProductInfoAppService, IMpCourseSignupAppService mpCourseSignupAppService, ICustomerServiceOnlineAppService customerServiceOnlineAppService)
        {
            _cacheManager                    = cacheManager;
            _mpUserMemberAppService          = mpUserMemberAppService;
            _mpBabyTextAppService            = mpBabyTextAppService;
            _mpShoppingMallPicAppService     = mpShoppingMallPicAppService;
            _mpFanAppService                 = mpFanAppService;
            _accessTokenContainer            = accessTokenContainer;
            _mpApiTokenAppService            = mpApiTokenAppService;
            _matialFileService               = matialFileService;
            _yiliBabyClubInterfaceService    = yiliBabyClubInterfaceService;
            _mpProductInfoAppService         = mpProductInfoAppService;
            _mpCourseSignupAppService        = mpCourseSignupAppService;
            _customerServiceOnlineAppService = customerServiceOnlineAppService;

            MamaBanToYun2OneMediaID = _matialFileService.MaMaBanToYun2One;
            JNHToLongLineMediaID    = _matialFileService.JNHToLongLine;
            defaultUserName         = _yiliBabyClubInterfaceService.ApiUserName;
            defaultUserPwd          = _yiliBabyClubInterfaceService.ApiPassword;
            deviceCode = _yiliBabyClubInterfaceService.ApiDeviceCode;
            yiliwechat = _yiliBabyClubInterfaceService.Yiliwechat;
        }
        public CustomMessageHandler(Stream inputStream, PostModel postModel, ILogger logger
                                    , ICacheManager cacheManager, IMpAccountAppService mpAccountAppService, int _mpId
                                    , IMpEventAppService mpEventAppService, IMpMediaVideoAppService mpMediaVideoAppService
                                    , IMpSelfArticleAppService mpSelfArticleAppService
                                    , IMpSelfArticleGroupAppService mpSelfArticleGroupAppService
                                    , IMpSelfArticleGroupItemAppService mpSelfArticleGroupItemAppService
                                    , IMpEventRequestMsgLogAppService mpEventRequestMsgLogAppService
                                    , IMpKeyWordReplyAppService mpKeyWordReplyAppService
                                    , IMpEventClickViewLogAppService mpEventClickViewLogAppService
                                    , IMpMenuAppService mpMenuAppService
                                    , IMpMessageAppService mpMessageAppService
                                    , IAccessTokenContainer accessTokenContainer
                                    , IMpFanAppService mpFanAppService
                                    , IMpEventScanLogAppService mpEventScanLogAppService
                                    , ICustomerServiceResponseTextAppService customerServiceResponseTextAppService
                                    , IMpUserMemberAppService mpUserMemberAppService
                                    , MpAccountDto account
                                    , IMpChannelAppService mpChannelAppService
                                    , IIocResolver iocResolver
                                    , IMatialFileService matialFileService
                                    , IWebUrlService webUrlService
                                    , IYiliBabyClubInterfaceService yiliBabyClubInterfaceService
                                    , int maxRecordCount = 0)
            : base(inputStream, postModel, maxRecordCount)
        {
            mpId                                   = _mpId;
            _cacheManager                          = cacheManager;
            _logger                                = logger;
            _accessTokenContainer                  = accessTokenContainer;
            _mpAccountAppService                   = mpAccountAppService;
            _mpEventAppService                     = mpEventAppService;
            _mpEventClickViewLogAppService         = mpEventClickViewLogAppService;
            _mpEventRequestMsgLogAppService        = mpEventRequestMsgLogAppService;
            _mpEventScanLogAppService              = mpEventScanLogAppService;
            _mpFanAppService                       = mpFanAppService;
            _mpKeyWordReplyAppService              = mpKeyWordReplyAppService;
            _mpMediaVideoAppService                = mpMediaVideoAppService;
            _mpMenuAppService                      = mpMenuAppService;
            _mpMessageAppService                   = mpMessageAppService;
            _mpSelfArticleGroupItemAppService      = mpSelfArticleGroupItemAppService;
            _mpSelfArticleGroupAppService          = mpSelfArticleGroupAppService;
            _mpSelfArticleAppService               = mpSelfArticleAppService;
            WeixinContext.ExpireMinutes            = 3;
            _customerServiceResponseTextAppService = customerServiceResponseTextAppService;
            _mpUserMemberAppService                = mpUserMemberAppService;
            _iocResolver                           = iocResolver;
            _account                               = account;
            _matialFileService                     = matialFileService;
            _webUrlService                         = webUrlService;
            _mpChannelAppService                   = mpChannelAppService;
            _yiliBabyClubInterfaceService          = yiliBabyClubInterfaceService;
            domain                                 = _webUrlService.GetSiteRootAddress();
            if (!string.IsNullOrEmpty(postModel.AppId))
            {
                appId = postModel.AppId;//通过第三方开放平台发送过来的请求
            }

            //在指定条件下,不使用消息去重
            base.OmitRepeatedMessageFunc = requestMessage =>
            {
                var textRequestMessage = requestMessage as RequestMessageText;
                if (textRequestMessage != null && textRequestMessage.Content == "容错")
                {
                    return(false);
                }
                return(true);
            };
        }