Exemplo n.º 1
0
        private static string GetShengLvCommunicationMessage(TB_hotelcashorder order, int type)
        {
            string message = string.Empty;
            string orderNo = string.IsNullOrEmpty(order.sourceOrderID) ? order.taoBaoOrderId.ToString() : order.sourceOrderID;

            if (type == 1)        //满房
            {
                message = string.Format("尊敬的{0}客人,您预订的{1}酒店 订单号:{2} 经酒店回复无法确认订单,为避免影响您的行程,请申请退款并改订其他,祝您旅途愉快!如需帮助请致电0851-88574693 ", order.contactName, order.hotelName, order.taoBaoOrderId);
            }
            else if (type == 2)   //沟通
            {
                message = string.Format("尊敬的{0}客人,您预订的{1}酒店 豪华标准间房型,商家有事需要与您沟通,请您看到短信后及时与商家旺旺或电话联系,以免耽误您的行程,如需帮助请致电0851-88574693 ", order.contactName, order.hotelName);
            }
            else if (type == 3)    //开票提醒
            {
                message = string.Format(@"尊敬的{0}客人,您预订的{1}酒店已入住离店,如需发票请操作收货,并联系商家旺旺或拨打热线0851-88574693提供您的开票相关信息,需离店后1个月内提交发票申请,逾期无法开具,感谢您的配合!", order.contactName, order.hotelName);
            }
            else if (type == 4)   //部分退款
            {
                message = string.Format(@"尊敬的{0}客人,您预订的{1}酒店,订单号{2}经申请可部分退款,您需修改退款金额,退款原因选择协商一致,可戳链接 http://t.cn/RG0yGDm 操作,如需帮助请联系商家旺旺或电话0851-88574693 ", order.contactName, order.hotelName, orderNo);
            }
            else if (type == 5)    //无法联系客人
            {
                message = string.Format("尊敬的{0}客人,您预订的{1}酒店,收到您来电告知到店查询不到订单,此单已核实有预定,您可以在前台直接报{2}+18198103603进行查询,不需要报飞猪网,由于无法接通您的手机,在此短信通知您可以正常安排入住,祝您入住愉快!如有问题,请联系我们的旺旺或商家电话:0851-88574693 ", order.contactName, order.hotelName, order.sourceOrderID);
            }
            else if (type == 6)    //修改退款原因
            {
                message = string.Format(@"尊敬的{0}客人,您预订的{1}酒店,订单号{2}经申请可部分退款,您需修改退款金额,退款原因选择协商一致,可戳链接 http://t.cn/RG0yGDm 操作,如需帮助请联系商家旺旺或电话0851-88574693 ", order.contactName, order.hotelName, orderNo);
            }
            return(message);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 保存订单
        /// </summary>
        /// <param name="channel"></param>
        /// <param name="order"></param>
        /// <returns></returns>
        public ServiceResult SaveOrder(ProductChannel channel, TmallOrderDto order)
        {
            var result = new ServiceResult();

            try
            {
                var tbOrder = new TB_hotelcashorder();
                Mapper.Map(order, tbOrder);
                tbOrder.orderCheckoutDate = new DateTime(1990, 1, 1);

                var shop = (ShopType)order.shopType;
                if (channel == ProductChannel.MT)
                {
                    if (shop == ShopType.ShengLv)
                    {
                        tbOrder.orderType = 11;
                    }
                    else if (shop == ShopType.RenNiXing)
                    {
                        tbOrder.orderType = 14;
                    }
                    else
                    {
                        tbOrder.orderType = 13;
                    }
                }
                else if (channel == ProductChannel.Ctrip)
                {
                    if (order.RatePlanCode.Contains("_c"))
                    {
                        tbOrder.orderType = 16;
                    }
                    else
                    {
                        //15 喜玩携程    5辰亿
                        tbOrder.orderType = CtripOrderType();
                    }
                    //if (shop == ShopType.LingZhong)
                    //{
                    //    tbOrder.orderType = 5;
                    //}
                    //else
                    //{
                    //    tbOrder.orderType = 15;
                    //}
                }
                else if (channel == ProductChannel.DDS)
                {
                    //大都市产品
                    tbOrder.orderType = 17;
                }
                else
                {
                    tbOrder.orderType = Int16.Parse(channel.GetDescription());
                }

                tbOrder.serviceTimeount = new DateTime(1990, 1, 1);       // GetDelayTime(dto.checkInDate);
                tbOrder.prePay          = 1;

                if (channel == ProductChannel.Elong)
                {
                    tbOrder.source = "elong";
                }
                else if (channel == ProductChannel.LY)
                {
                    tbOrder.source = "tclj";
                }
                tbOrder.Refuse = 0;   //退款标记

                var isSuccess = sqlSugarClient.Insertable(tbOrder).ExecuteCommand() > 0;
                if (isSuccess)
                {
                    return(result.SetSucess("保存订单成功"));
                }
                else
                {
                    return(result.SetError("保存订单失败"));
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }