public string OnGetPlatformConfigXml(ResturantPlatformType platformType) { if (platformType == ResturantPlatformType.Meituan) { return(@"<?xml version=""1.0"" encoding=""utf-8""?> <r> <developerId>101636</developerId> <SignKey>lk7n5vc76uvq11pr</SignKey> </r>"); } else if (platformType == ResturantPlatformType.Meituan) { return(@"<?xml version=""1.0"" encoding=""utf-8""?> <r> <developerId>101572</developerId> <SignKey>q25w5ibpttho0xmb</SignKey> </r>"); } else if (platformType == ResturantPlatformType.Ele) { return(@"<?xml version=""1.0"" encoding=""utf-8""?> <r> <Key>luHfyTsQLO</Key> <Secret>000358ab2127e08fbcbb8e34aa0252563a9c01dc</Secret> </r>"); } return(null); }
public void OnOrderCancel(ResturantPlatformType platformType, OrderCancelInfo orderInfo) { using (Way.Lib.CLog log = new Way.Lib.CLog("取消订单")) { log.LogJson(orderInfo); } }
public void OnCancelOrderRefund(ResturantPlatformType platformType, OrderRefundInfo info) { using (Way.Lib.CLog log = new Way.Lib.CLog("用户取消退单")) { log.LogJson(info); } }
public void OnOrderFinish(ResturantPlatformType platformType, string orderId) { using (Way.Lib.CLog log = new Way.Lib.CLog("订单已完成")) { log.Log(orderId); } }
public string OnGetPlatformConfigXml(ResturantPlatformType platformType) { if (platformType == ResturantPlatformType.Meituan) { return(@"<?xml version=""1.0"" encoding=""utf-8""?> <r> <developerId>101572</developerId> <SignKey>q25w5ibpttho0xmb</SignKey> </r>"); } else if (platformType == ResturantPlatformType.Ele) { return(@"<?xml version=""1.0"" encoding=""utf-8""?> <r> <Key>luHfyTsQLO</Key> <Secret>000358ab2127e08fbcbb8e34aa0252563a9c01dc</Secret> </r>"); } else if (platformType == ResturantPlatformType.Baidu) { return(@"<?xml version=""1.0"" encoding=""utf-8""?> <r> <Source>32517</Source> <Secret>e9f6c48545ee588c</Secret> <StoreMapSource>D8E7CE6CF9ECD7D5F396B1E0BB366A5A9614A7F101CAA7AFFD666A2282894D07</StoreMapSource> </r>"); } return(null); }
public void OnReceiveOrderSettlement(ResturantPlatformType platformType, string orderId, double settleAmount) { using (Way.Lib.CLog log = new Way.Lib.CLog("收到订单结算信息")) { log.Log("orderId:{0}", orderId); log.Log("settleAmount:{0}", settleAmount); } }
public string OnGetPlatformToken(ResturantPlatformType platformType, string orderId) { if (platformType == ResturantPlatformType.Ele) { return(""); } return(null); }
public void OnStoreMapSuccess(ResturantPlatformType platformType, StoreMapInfo mapinfo) { //门店映射成功,接收token using (Way.Lib.CLog log = new Way.Lib.CLog("成功映射门店")) { log.Log($"erpStoreId:{mapinfo.ErpStoreId} token:{mapinfo.Token} refresh_token:{mapinfo.Refresh_token} expires:{mapinfo.Expires}"); } }
public string OnGetPlatformConfigXml(ResturantPlatformType platformType) { return(@"<?xml version=""1.0"" encoding=""utf-8""?> <r> <Source>63968</Source> <Secret>27051c3adcf34097</Secret> <StoreMapSource>D8E7CE6CF9ECD7D5F396B1E0BB366A5A9614A7F101CAA7AFFD666A2282894D07</StoreMapSource> </r>"); }
public string OnGetToken(ResturantPlatformType platformType, int erpStoreId) { if (platformType == ResturantPlatformType.Ele) { return("e4d1ffda63f5a1023224f8f6e23af571"); } else { return(null); } }
public List <Shop> OnGetShopList(ResturantPlatformType platformType, int companyId) { var result = new List <Shop>(); result.Add(new Shop() { id = 1, Name = "我的测试门店" }); return(result); }
public void OnReceiveNewOrder(ResturantPlatformType platformType, OrderInfo orderInfo) { using (Way.Lib.CLog log = new Way.Lib.CLog("新订单")) { log.LogJson(orderInfo); } var resturant = ResturantFactory.CreateResturant(platformType); //取消订单 //resturant.CancelOrder(new CancelOrderParameter() { // OrderID = orderInfo.ThirdOrderId, // Reason = CancelOrderReason.Busy, // Token = StoreInfos[orderInfo.ErpStoreID.Value] //}); //确认订单 ConfirmOrderParameter parameter = new ConfirmOrderParameter(); parameter.OrderID = orderInfo.ThirdOrderId; parameter.Token = "f8b8211858f6307d24b97e67aa3915e3e5aa78d0dbc7765618fb8485901db153"; resturant.ConfirmOrder(parameter); return; //发起配送 resturant.Delivering(new DeliverParameter() { CourierName = "刘培松", CourierPhone = "13261952754", OrderID = orderInfo.ThirdOrderId, Token = StoreInfos[orderInfo.ErpStoreID.Value], }); resturant.Delivered(new DeliveredParameter() { OrderID = orderInfo.ThirdOrderId, Token = StoreInfos[orderInfo.ErpStoreID.Value], }); }
public string OnGetPlatformConfigXml(ResturantPlatformType platformType) { if (platformType == ResturantPlatformType.Meituan) { return(@"<?xml version=""1.0"" encoding=""utf-8""?> <r> <developerId>101572</developerId> <SignKey>q25w5ibpttho0xmb</SignKey> </r>"); } else if (platformType == ResturantPlatformType.Ele) { return(@"<?xml version=""1.0"" encoding=""utf-8""?> <r> <Key>h5JvsZ7aCZ</Key> <Secret>b7d6dd01f0f8b91f797b03f78c23bdf56e1f96ba</Secret> </r>"); } return(null); }
public void OnReceiveOrderSettlement(ResturantPlatformType platformType, string orderId, ServiceAmountInfo serviceAmountInfo) { }
public void OnReleaseStoreMapSuccess(ResturantPlatformType platformType, int erpStoreId) { }
public void OnOrderCancel(ResturantPlatformType platformType, OrderCancelInfo orderInfo) { throw new NotImplementedException(); }
public void OnOrderRefundCompleted(ResturantPlatformType platformType, OrderRefundInfo info) { }
public void OnOrderRefund(ResturantPlatformType platformType, OrderRefundInfo info) { throw new NotImplementedException(); }
public void OnOrderFinish(ResturantPlatformType platformType, string orderId) { throw new NotImplementedException(); }
public void OnStoreMapSuccess(ResturantPlatformType platformType, StoreMapInfo mapinfo) { throw new NotImplementedException(); }
public void OnReceiveNewOrder(ResturantPlatformType platformType, OrderInfo orderInfo) { }
public void OnOrderFinish(ResturantPlatformType platformType, string orderId) { }
public void OnCancelOrderRefund(ResturantPlatformType platformType, OrderRefundInfo info) { }
public string OnGetPlatformToken(ResturantPlatformType platformType, string orderId) { return(Token); }
public void OnCompanyMapSuccess(ResturantPlatformType platformType, int companyId, StoreMapInfo[] mapinfo) { }
public List <Shop> OnGetShopList(ResturantPlatformType platformType, int companyId) { return(new List <Shop>()); }
public List <Shop> OnGetShopList(ResturantPlatformType platformType, int companyId) { throw new NotImplementedException(); }
public void OnReceiveNewOrder(ResturantPlatformType platformType, OrderInfo orderInfo) { throw new NotImplementedException(); }
public void OnStoreMapSuccess(ResturantPlatformType platformType, StoreMapInfo mapinfo) { }
public void OnOrderCancel(ResturantPlatformType platformType, OrderCancelInfo orderInfo) { }