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);
        }
Example #2
0
 public void OnOrderCancel(ResturantPlatformType platformType, OrderCancelInfo orderInfo)
 {
     using (Way.Lib.CLog log = new Way.Lib.CLog("取消订单"))
     {
         log.LogJson(orderInfo);
     }
 }
Example #3
0
 public void OnCancelOrderRefund(ResturantPlatformType platformType, OrderRefundInfo info)
 {
     using (Way.Lib.CLog log = new Way.Lib.CLog("用户取消退单"))
     {
         log.LogJson(info);
     }
 }
Example #4
0
 public void OnOrderFinish(ResturantPlatformType platformType, string orderId)
 {
     using (Way.Lib.CLog log = new Way.Lib.CLog("订单已完成"))
     {
         log.Log(orderId);
     }
 }
Example #5
0
        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);
        }
Example #6
0
 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);
     }
 }
Example #7
0
 public string OnGetPlatformToken(ResturantPlatformType platformType, string orderId)
 {
     if (platformType == ResturantPlatformType.Ele)
     {
         return("");
     }
     return(null);
 }
Example #8
0
 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>");
        }
Example #10
0
 public string OnGetToken(ResturantPlatformType platformType, int erpStoreId)
 {
     if (platformType == ResturantPlatformType.Ele)
     {
         return("e4d1ffda63f5a1023224f8f6e23af571");
     }
     else
     {
         return(null);
     }
 }
Example #11
0
        public List <Shop> OnGetShopList(ResturantPlatformType platformType, int companyId)
        {
            var result = new List <Shop>();

            result.Add(new Shop()
            {
                id   = 1,
                Name = "我的测试门店"
            });
            return(result);
        }
Example #12
0
        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],
            });
        }
Example #13
0
        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);
        }
Example #14
0
 public void OnReceiveOrderSettlement(ResturantPlatformType platformType, string orderId, ServiceAmountInfo serviceAmountInfo)
 {
 }
Example #15
0
 public void OnReleaseStoreMapSuccess(ResturantPlatformType platformType, int erpStoreId)
 {
 }
Example #16
0
 public void OnOrderCancel(ResturantPlatformType platformType, OrderCancelInfo orderInfo)
 {
     throw new NotImplementedException();
 }
Example #17
0
 public void OnOrderRefundCompleted(ResturantPlatformType platformType, OrderRefundInfo info)
 {
 }
Example #18
0
 public void OnOrderRefund(ResturantPlatformType platformType, OrderRefundInfo info)
 {
     throw new NotImplementedException();
 }
Example #19
0
 public void OnOrderFinish(ResturantPlatformType platformType, string orderId)
 {
     throw new NotImplementedException();
 }
Example #20
0
 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);
 }
Example #25
0
 public void OnCompanyMapSuccess(ResturantPlatformType platformType, int companyId, StoreMapInfo[] mapinfo)
 {
 }
 public List <Shop> OnGetShopList(ResturantPlatformType platformType, int companyId)
 {
     return(new List <Shop>());
 }
Example #27
0
 public List <Shop> OnGetShopList(ResturantPlatformType platformType, int companyId)
 {
     throw new NotImplementedException();
 }
Example #28
0
 public void OnReceiveNewOrder(ResturantPlatformType platformType, OrderInfo orderInfo)
 {
     throw new NotImplementedException();
 }
 public void OnStoreMapSuccess(ResturantPlatformType platformType, StoreMapInfo mapinfo)
 {
 }
 public void OnOrderCancel(ResturantPlatformType platformType, OrderCancelInfo orderInfo)
 {
 }