/// <summary> /// 获取服务 /// </summary> /// <returns></returns> public IAfterSaleService GetInstance() { if (Instance == null) { Instance = new AfterSaleService(); } return(Instance); }
public static IAfterSaleService GetSaleService(AfterSaleServiceTypeEnum type) { IAfterSaleService afterSaleService = null; switch (type) { case AfterSaleServiceTypeEnum.Exchange: afterSaleService = new ExchangeService(); break; case AfterSaleServiceTypeEnum.RefundWhithReturn: afterSaleService = new RefundWhithReturnService(); break; case AfterSaleServiceTypeEnum.RefundWhitoutReturn: afterSaleService = new RefundWhitoutReturnService(); break; } return(afterSaleService); }