public BaseAPIController() : base() { lgBus = new LoginBusiness(this.GetContext()); newsBus = new NewsBusiness(this.GetContext()); notiBus = new NotifyBusiness(this.GetContext()); giftBus = new GiftBusiness(this.GetContext()); rqBus = new RequestBusiness(this.GetContext()); cusBus = new CustomerBusiness(this.GetContext()); mBus = new MessageBusiness(this.GetContext()); apiBus = new RequestAPIBusiness(this.GetContext()); pBus = new PointBusiness(this.GetContext()); statisticBus = new StatisticBusiness(this.GetContext()); shopBus = new ShopBusiness(this.GetContext()); itemBus = new ItemBusiness(this.GetContext()); orderBus = new OrderBusiness(this.GetContext()); packBus = new PackageBusiness(this.GetContext()); vnPay = new VNPay(this.GetContext()); }
public BaseController() : base() { loginBusiness = new LoginBusiness(this.GetContext()); batchBusiness = new BatchBusiness(this.GetContext()); cardBusiness = new CardBusiness(this.GetContext()); requestBusiness = new RequestBusiness(this.GetContext()); newsBusiness = new NewsBusiness(this.GetContext()); cusBusiness = new CustomerBusiness(this.GetContext()); rankBusiness = new RankBusiness(this.GetContext()); configBusiness = new ConfigBusiness(this.GetContext()); pointBusiness = new PointBusiness(this.GetContext()); warrantyBusiness = new WarrantyBusiness(this.GetContext()); statisticBus = new StatisticBusiness(this.GetContext()); orderBus = new OrderBusiness(this.GetContext()); userBusiness = new UserBusiness(this.GetContext()); itemBusiness = new ItemBusiness(this.GetContext()); productsBusiness = new ItemBusiness(this.GetContext()); notifyBusiness = new NotifyBusiness(this.GetContext()); shopBusiness = new ShopBusiness(this.GetContext()); agentBusiness = new AgentBusiness(this.GetContext()); vnpay = new VNPay(this.GetContext()); }
public static bool ShopDifference() { bool syncsuccess = true; try { StringBuilder sb = new StringBuilder(""); Dictionary <string, string> shopDic = GetShopDic(); using (var thirdpartyclient = new Tuhu.Service.ThirdParty.AliPayServiceClient()) { foreach (KeyValuePair <string, string> item in shopDic) { var shopid = Convert.ToInt32(item.Key); if (IsVailShop(shopid)) { var TuanGouList = ShopBusiness.GetTuanGouXiCheModel(shopid); if (!TuanGouList.Any()) { // Console.WriteLine("途虎门店"+item.Key + "|" + item.Value+"不存在美容团购服务"); var result = thirdpartyclient.IsExistedShop(shopid); if (result != null && result.Result) { // var servicelist = ShopBusiness.tuangouxicheTypes.Select(p => shopid + "|" + p).ToList(); foreach (var tuhupid in ShopBusiness.tuangouxicheTypes) { var pid = shopid + "|" + tuhupid; var serviceresult = thirdpartyclient.IsExistedShopService(pid); if (serviceresult != null && serviceresult.Result) { Logger.Info($"门店服务{shopid}不同步,需同步"); thirdpartyclient.DeleteShopServiceFromCheZhuPlatform(shopid, tuhupid); sb.AppendLine("途虎门店" + item.Key + "|" + item.Value + "不存在美容团购服务"); sb.AppendLine("车主平台" + item.Key + "|" + item.Value + "存在" + pid + "美容团购服务"); //break; } } } } } else { Logger.Info($"途虎门店{shopid}下架或者不在营业时间内"); if (ShopIsExistedInAliPay(shopid)) { Logger.Info($"车主平台存在门店{shopid},需修改下架状态"); thirdpartyclient.UpdateShopsFlagToCheZhuPlatform(new List <int> { shopid }, null, false); } else { Logger.Info($"车主平台不存在门店{shopid},无需处理此门店"); } } } } if (sb.Length > 0) { SendMail("门店不同步日志信息", ConfigurationManager.AppSettings["CheckAlipayShopJob:To"], sb.ToString()); } } catch (Exception ex) { syncsuccess = false; Logger.Info("ShopDifference Error", ex); } return(false); }