コード例 #1
0
        public override void Init()
        {
            base.Init();
            var os = _container.Resolve <IOrchardServices>();

            _merchantService     = _container.Resolve <IMerchantService>();
            _verifyCodeGenerator = _container.Resolve <IVerifyCodeGenerator>();
            long.TryParse(_verifyCodeGenerator.GenerateNewVerifyCode(), out _merchantid);
            _enjoyAuthService  = _container.Resolve <IEnjoyAuthService>();
            _weChatMsgHandler  = _container.Resolve <IWeChatMsgHandler>();
            _cardCouponService = _container.Resolve <ICardCouponService>();
            _weChatApi         = _container.Resolve <IWeChatApi>();
            CreatingEnjoyUserAndMerchant();
            //CreatingCardCoupon();
        }
コード例 #2
0
 public EnjoyController(
     IOrchardServices os,
     IEnjoyAuthService auth,
     IWeChatApi wechat,
     IMerchantService merchant,
     IWxUserService wxUserService,
     IShopService shop,
     ICardCouponService cardCoupon,
     IWeChatMsgHandler handler)
 {
     this._authService       = auth;
     this._os                = os;
     this._merchantService   = merchant;
     this._weChat            = wechat;
     this.Logger             = NullLogger.Instance;
     this._handler           = handler;
     this._wxUserService     = wxUserService;
     this._shopservice       = shop;
     this._cardCouponService = cardCoupon;
 }
コード例 #3
0
 public ModelClient(
     IWeChatApi api,
     IWeChatUserService wxUserService,
     IRandomGenerator generator,
     IWeChatPayService payService,
     IMCardService mCardService,
     ISharingHostService hostService,
     IWeChatMsgHandler weChatMsgHandler,
     TencentCMQClientFactory factory,
     IDatabaseFactory databaseFactory,
     IConfiguration configuration)
 {
     this.wxapi = api;
     this.sharingHostService = hostService;
     this.wxUserService      = wxUserService;
     this.generator          = generator;
     this.weChatPayService   = payService;
     this.mCardService       = mCardService;
     this.handler            = weChatMsgHandler;
     this.cmqclient          = factory.Create <OnlineOrder>("lemon");
     this.databaseFactory    = databaseFactory;
     this.configuration      = configuration;
 }