/// <summary> /// 获取平台配置 /// </summary> /// <returns></returns> public EyouSoft.Model.SystemStructure.MSysSettingInfo GetSysSetting() { EyouSoft.Model.SystemStructure.MSysSettingInfo info = (EyouSoft.Model.SystemStructure.MSysSettingInfo)EyouSoft.Cache.Facade.EyouSoftCache.GetCache(EyouSoft.CacheTag.System.SysSetting); if (info != null) { return(info); } info = dal.GetSysSetting(); if (info == null) { info = new EyouSoft.Model.SystemStructure.MSysSettingInfo(); info.OrderSmsIsEnable = false; } if (!EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance().IsExistsUserId(info.OrderSmsCompanyId, info.OrderSmsUserId)) { info.OrderSmsIsEnable = false; } EyouSoft.Cache.Facade.EyouSoftCache.Add(EyouSoft.CacheTag.System.SysSetting, info); return(info); }
/// <summary> /// 页面加载 /// </summary> protected void InitPage() { EyouSoft.Model.SystemStructure.MSysSettingInfo SettingInfoModel = new EyouSoft.Model.SystemStructure.MSysSettingInfo(); SettingInfoModel = EyouSoft.BLL.SystemStructure.SystemInfo.CreateInstance().GetSysSetting(); GetSendBusiness(); InitSendChannel(); //发送供应商类型 this.hid_BusinessType.Value = Getstr(SettingInfoModel.OrderSmsCompanyTypes); //发送内容 this.SendContent.Value = SettingInfoModel.OrderSmsTemplate; //公司编号 this.txt_CompanyId.Value = SettingInfoModel.OrderSmsCompanyId; //发送通道 this.ddlSendChannel.SelectedIndex = (int)SettingInfoModel.OrderSmsChannelIndex; }
/// <summary> /// 设置平台配置,返回1成功,其它失败 /// </summary> /// <param name="info">配置信息</param> /// <returns></returns> public int SetSysSettings(EyouSoft.Model.SystemStructure.MSysSettingInfo info) { if (info == null) { throw new System.Exception("平台配置业务实体is null。"); //return -1; } if (info.OrderSmsIsEnable) { if (string.IsNullOrEmpty(info.OrderSmsCompanyId) || string.IsNullOrEmpty(info.OrderSmsUserId) || info.OrderSmsUserId.Length != 36 || info.OrderSmsUserId.Length != 36) { throw new System.Exception("订单短信控制-发送短信公司或用户编号填写错误1。"); //return -2; } if (!EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance().IsExistsUserId(info.OrderSmsCompanyId, info.OrderSmsUserId)) { throw new System.Exception("订单短信控制-发送短信公司或用户编号填写错误2。"); //return -3; } } int dalRetCode = dal.SetSysSettings(info, new string[] { }); if (dalRetCode == 1) { EyouSoft.Cache.Facade.EyouSoftCache.Remove(EyouSoft.CacheTag.System.SysSetting); return(1); } return(dalRetCode); }
protected void btnSubmit_Click(object sender, EventArgs e) { OrderSource[] ordersoure = new OrderSource[1]; ordersoure[0] = OrderSource.线路散拼订单; EyouSoft.Model.SystemStructure.MSysSettingInfo SettingInfoModel = new EyouSoft.Model.SystemStructure.MSysSettingInfo(); SettingInfoModel = EyouSoft.BLL.SystemStructure.SystemInfo.CreateInstance().GetSysSetting(); SettingInfoModel.OrderSmsChannelIndex = Convert.ToByte(Utils.GetFormValue(ddlSendChannel.UniqueID)); SettingInfoModel.OrderSmsCompanyId = Utils.GetFormValue(txt_CompanyId.UniqueID); SettingInfoModel.OrderSmsCompanyTypes = getArry(); SettingInfoModel.OrderSmsIsEnable = string.IsNullOrEmpty(Utils.GetFormValue(txt_CompanyId.UniqueID)); SettingInfoModel.OrderSmsOrderTypes = ordersoure; SettingInfoModel.OrderSmsTemplate = Utils.GetFormValue("SendContent"); SettingInfoModel.OrderSmsUserId = Utils.GetFormValue(CompanyContact.UniqueID); int flag = EyouSoft.BLL.SystemStructure.SystemInfo.CreateInstance().SetSysSettings(SettingInfoModel); if (flag == 1) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('提交成功!');window.location.href='/LineManage/OrderMsgManage.aspx' </script>"); } else { ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('提交失败!'); </script>"); } }
/// <summary> /// 获取平台配置 /// </summary> /// <returns></returns> public virtual EyouSoft.Model.SystemStructure.MSysSettingInfo GetSysSetting() { EyouSoft.Model.SystemStructure.MSysSettingInfo info = null; DbCommand cmd = SystemStore.GetSqlStringCommand(SQL_SELECT_GetSysSetting); using (IDataReader rdr = DbHelper.ExecuteReader(cmd, SystemStore)) { while (rdr.Read()) { info = info ?? new EyouSoft.Model.SystemStructure.MSysSettingInfo(); string key = rdr.GetString(0); string value = rdr.GetString(1); switch (key) { case SettingKey_OrderSmsCompanyId: info.OrderSmsCompanyId = value; break; case SettingKey_OrderSmsCompanyType: string[] _items1 = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); if (_items1 != null && _items1.Length > 0) { int length = _items1.Length; info.OrderSmsCompanyTypes = new EyouSoft.Model.CompanyStructure.CompanyLev[length]; for (int i = 0; i < length; i++) { info.OrderSmsCompanyTypes[i] = (EyouSoft.Model.CompanyStructure.CompanyLev) int.Parse(_items1[i]); } } break; case SettingKey_OrderSmsIsEnable: info.OrderSmsIsEnable = value == "1"; break; case SettingKey_OrderSmsOrderType: string[] _items2 = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); if (_items2 != null && _items2.Length > 0) { int length = _items2.Length; info.OrderSmsOrderTypes = new Model.NewTourStructure.OrderSource[length]; for (int i = 0; i < length; i++) { info.OrderSmsOrderTypes[i] = (EyouSoft.Model.NewTourStructure.OrderSource) int.Parse(_items2[i]); } } break; case SettingKey_OrderSmsTemplate: info.OrderSmsTemplate = value; break; case SettingKey_OrderSmsUserId: info.OrderSmsUserId = value; break; case SettingKey_OrderSmsChannelIndex: info.OrderSmsChannelIndex = byte.Parse(value); break; default: break; } } } return(info); }
/// <summary> /// 设置平台配置,返回1成功,其它失败 /// </summary> /// <param name="info">配置信息</param> /// <param name="removeKeys">不处理的键组</param> /// <returns></returns> public virtual int SetSysSettings(EyouSoft.Model.SystemStructure.MSysSettingInfo info, string[] removeKeys) { string orderSmsCompanyTypes = string.Empty; string orderSmsOrderTypes = string.Empty; if (info.OrderSmsCompanyTypes != null && info.OrderSmsCompanyTypes.Length > 0) { foreach (var item in info.OrderSmsCompanyTypes) { orderSmsCompanyTypes += "," + (int)item; } orderSmsCompanyTypes = orderSmsCompanyTypes.Substring(1); } if (info.OrderSmsOrderTypes != null && info.OrderSmsOrderTypes.Length > 0) { foreach (var item in info.OrderSmsOrderTypes) { orderSmsOrderTypes += "," + (int)item; } orderSmsOrderTypes = orderSmsOrderTypes.Substring(1); } DbCommand cmd = SystemStore.GetSqlStringCommand("PRINT 1"); StringBuilder cmdText = new StringBuilder(); if (!removeKeys.Contains(SettingKey_OrderSmsCompanyId)) { cmdText.AppendFormat(SQL_SET_SetSysSettings, SettingKey_OrderSmsCompanyId); SystemStore.AddInParameter(cmd, "Key" + SettingKey_OrderSmsCompanyId, DbType.AnsiString, SettingKey_OrderSmsCompanyId); SystemStore.AddInParameter(cmd, "Value" + SettingKey_OrderSmsCompanyId, DbType.String, info.OrderSmsCompanyId); } if (!removeKeys.Contains(SettingKey_OrderSmsCompanyType)) { cmdText.AppendFormat(SQL_SET_SetSysSettings, SettingKey_OrderSmsCompanyType); SystemStore.AddInParameter(cmd, "Key" + SettingKey_OrderSmsCompanyType, DbType.AnsiString, SettingKey_OrderSmsCompanyType); SystemStore.AddInParameter(cmd, "Value" + SettingKey_OrderSmsCompanyType, DbType.String, orderSmsCompanyTypes); } if (!removeKeys.Contains(SettingKey_OrderSmsIsEnable)) { cmdText.AppendFormat(SQL_SET_SetSysSettings, SettingKey_OrderSmsIsEnable); SystemStore.AddInParameter(cmd, "Key" + SettingKey_OrderSmsIsEnable, DbType.AnsiString, SettingKey_OrderSmsIsEnable); SystemStore.AddInParameter(cmd, "Value" + SettingKey_OrderSmsIsEnable, DbType.String, info.OrderSmsIsEnable ? "1" : "0"); } if (!removeKeys.Contains(SettingKey_OrderSmsOrderType)) { cmdText.AppendFormat(SQL_SET_SetSysSettings, SettingKey_OrderSmsOrderType); SystemStore.AddInParameter(cmd, "Key" + SettingKey_OrderSmsOrderType, DbType.AnsiString, SettingKey_OrderSmsOrderType); SystemStore.AddInParameter(cmd, "Value" + SettingKey_OrderSmsOrderType, DbType.String, orderSmsOrderTypes); } if (!removeKeys.Contains(SettingKey_OrderSmsTemplate)) { cmdText.AppendFormat(SQL_SET_SetSysSettings, SettingKey_OrderSmsTemplate); SystemStore.AddInParameter(cmd, "Key" + SettingKey_OrderSmsTemplate, DbType.AnsiString, SettingKey_OrderSmsTemplate); SystemStore.AddInParameter(cmd, "Value" + SettingKey_OrderSmsTemplate, DbType.String, info.OrderSmsTemplate); } if (!removeKeys.Contains(SettingKey_OrderSmsUserId)) { cmdText.AppendFormat(SQL_SET_SetSysSettings, SettingKey_OrderSmsUserId); SystemStore.AddInParameter(cmd, "Key" + SettingKey_OrderSmsUserId, DbType.AnsiString, SettingKey_OrderSmsUserId); SystemStore.AddInParameter(cmd, "Value" + SettingKey_OrderSmsUserId, DbType.String, info.OrderSmsUserId); } if (!removeKeys.Contains(SettingKey_OrderSmsChannelIndex)) { cmdText.AppendFormat(SQL_SET_SetSysSettings, SettingKey_OrderSmsChannelIndex); SystemStore.AddInParameter(cmd, "Key" + SettingKey_OrderSmsChannelIndex, DbType.AnsiString, SettingKey_OrderSmsChannelIndex); SystemStore.AddInParameter(cmd, "Value" + SettingKey_OrderSmsChannelIndex, DbType.String, info.OrderSmsChannelIndex); } if (string.IsNullOrEmpty(cmdText.ToString())) { return(1); } cmd.CommandText = cmdText.ToString(); return(DbHelper.ExecuteSql(cmd, SystemStore) > 0 ? 1 : 0); }
private string FormSave() { //声明操作BLL EyouSoft.IBLL.NewTourStructure.IPowderList tourBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance(); //创建新的订单 EyouSoft.Model.NewTourStructure.MTourOrder orderModel = new EyouSoft.Model.NewTourStructure.MTourOrder(); string tourID = Utils.GetQueryStringValue("tourID"); //成人数 int adultCount = Utils.GetInt(Utils.GetFormValue(this.txtAdultCount.UniqueID)); if (adultCount == 0) { return("请输入成人数!"); } //儿童数 int childCount = Utils.GetInt(Utils.GetFormValue(this.txtChildCount.UniqueID)); //单房差 int otherCount = Utils.GetInt(Utils.GetFormValue(this.txtOtherCount.UniqueID)); //游客联系人 string contact = Utils.GetFormValue(this.txtContact.UniqueID); //游客联系电话 string conTactTel = Utils.GetFormValue(this.txtConTactTel.UniqueID); //负责人 string fzr = Utils.GetFormValue(this.txtFzr.UniqueID); if (fzr == "") { fzr = SiteUserInfo.ContactInfo.ContactName; } //负责人电话 string fzrTel = Utils.GetFormValue(this.txtFzrTel.UniqueID); if (fzrTel == "") { fzrTel = SiteUserInfo.ContactInfo.Tel; } //增减价格 decimal addPrice = 0; decimal.TryParse(Utils.GetFormValue(this.txtAddPrice.UniqueID), out addPrice); //增减结算价 decimal reductPrice = 0; decimal.TryParse(Utils.GetFormValue(this.txtReductPrice.UniqueID), out reductPrice); //游客备注 string cusRemark = Utils.GetFormValue(this.txtCusRemark.UniqueID); //组团备注 string remark = Utils.GetFormValue(this.txtRemark.UniqueID); #region 处理旅客 string[] txtName = Utils.GetFormValues("txtName"); string[] txtTel = Utils.GetFormValues("txtTel"); string[] txtCard = Utils.GetFormValues("txtCard"); string[] txtCardS = Utils.GetFormValues("txtCardS"); string[] txtCardT = Utils.GetFormValues("txtCardT"); string[] sltSex = Utils.GetFormValues("sltSex"); string[] sltChild = Utils.GetFormValues("sltChild"); string[] txtNumber = Utils.GetFormValues("txtNumber"); string[] txtRemarks = Utils.GetFormValues("txtRemarks"); string[] cbxVisitor = Utils.GetFormValues("cbxVisitor"); IList <EyouSoft.Model.NewTourStructure.MTourOrderCustomer> customerList = new List <EyouSoft.Model.NewTourStructure.MTourOrderCustomer>(); if (txtName.Length > 0) { for (int i = 0; i < txtName.Length; i++) { EyouSoft.Model.NewTourStructure.MTourOrderCustomer model = new EyouSoft.Model.NewTourStructure.MTourOrderCustomer(); model.CertificatesType = EyouSoft.Model.TicketStructure.TicketCardType.身份证; model.CompanyId = SiteUserInfo.CompanyID; if (cbxVisitor.Contains((i + 1).ToString())) { model.IsSaveToTicketVistorInfo = true; } model.Mobile = txtTel[i]; model.CradType = sltChild[i] == "0" ? EyouSoft.Model.TicketStructure.TicketVistorType.成人 : EyouSoft.Model.TicketStructure.TicketVistorType.儿童; model.IdentityCard = txtCard[i]; model.IssueTime = DateTime.Now; model.Notes = txtRemarks[i]; model.OtherCard = txtCardT[i]; model.Passport = txtCardS[i]; model.Sex = sltSex[i] == "0" ? EyouSoft.Model.CompanyStructure.Sex.男 : EyouSoft.Model.CompanyStructure.Sex.女; model.SiteNo = txtNumber[i]; model.VisitorName = txtName[i]; customerList.Add(model); } } #endregion #region 订单实体赋值 orderModel.Add = addPrice; orderModel.AdultNum = adultCount; orderModel.Reduction = reductPrice; #region 获得计划中价格信息 decimal reAdultPrice = 0; decimal reChilePrice = 0; decimal reOtherPrice = 0; decimal seAdultPrice = 0; decimal seChildPrice = 0; EyouSoft.Model.NewTourStructure.MPowderList tourModel = tourBll.GetModel(tourID); if (tourModel != null) { reAdultPrice = tourModel.RetailAdultPrice; reChilePrice = tourModel.RetailChildrenPrice; reOtherPrice = tourModel.MarketPrice; seAdultPrice = tourModel.SettlementAudltPrice; seChildPrice = tourModel.SettlementChildrenPrice; //订单实体赋值 orderModel.BusinessNotes = ""; orderModel.DayNum = tourModel.Day; orderModel.LateNum = tourModel.Late; orderModel.LeaveDate = tourModel.LeaveDate; orderModel.RouteId = tourModel.RouteId; orderModel.RouteName = tourModel.RouteName; orderModel.ScheduleNum = tourModel.OrderPeopleNum; orderModel.TourId = tourModel.TourId; orderModel.TourNo = tourModel.TourNo; } else { Response.Clear(); Response.Write("error"); Response.End(); } #endregion orderModel.ChildPrice = reChilePrice; orderModel.ChildrenNum = childCount; orderModel.Customers = customerList; orderModel.IssueTime = DateTime.Now; orderModel.MarketPrice = reOtherPrice; orderModel.OperationMsg = ""; orderModel.OperatorId = SiteUserInfo.ID; orderModel.OperatorName = SiteUserInfo.ContactInfo.ContactName; orderModel.OrderStatus = EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理; orderModel.PaymentStatus = EyouSoft.Model.NewTourStructure.PaymentStatus.游客未支付; orderModel.PersonalPrice = reAdultPrice; orderModel.SaveDate = null; orderModel.SettlementAudltPrice = seAdultPrice; orderModel.SettlementChildrenPrice = seChildPrice; orderModel.SingleRoomNum = otherCount; orderModel.VisitorNotes = cusRemark; orderModel.Travel = SiteUserInfo.CompanyID; orderModel.TravelContact = fzr; orderModel.TravelName = SiteUserInfo.CompanyName; orderModel.TravelNotes = remark; orderModel.TravelTel = fzrTel; orderModel.VisitorContact = contact; orderModel.VisitorNotes = cusRemark; orderModel.VisitorTel = conTactTel; //计划销售总价 orderModel.TotalSalePrice = adultCount * reAdultPrice + childCount * reChilePrice + otherCount * reOtherPrice + addPrice; //计算结算总价 orderModel.TotalSettlementPrice = adultCount * seAdultPrice + childCount * seChildPrice + reductPrice; if (EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance().AddOrUpdTourOrder(orderModel)) { #region 发送短信模块 EyouSoft.Model.SystemStructure.MSysSettingInfo SettingInfoModel = EyouSoft.BLL.SystemStructure.SystemInfo.CreateInstance().GetSysSetting(); //获得组团公司实体 EyouSoft.Model.CompanyStructure.CompanyDetailInfo travelComModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID); ////获得专线或地接公司实体 EyouSoft.Model.CompanyStructure.CompanyDetailInfo tourComModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(tourModel.Publishers); if (SettingInfoModel != null && travelComModel != null && tourComModel != null) { if (SettingInfoModel.OrderSmsCompanyTypes.Contains(travelComModel.CompanyLev)) { string sendMsg = SettingInfoModel.OrderSmsTemplate; sendMsg = sendMsg.Replace("[预订公司]", SiteUserInfo.CompanyName); sendMsg = sendMsg.Replace("[预订联系电话]", SiteUserInfo.ContactInfo.Mobile); sendMsg = sendMsg.Replace("[预订出发时间]", tourModel.LeaveDate.ToString("yyyy-MM-dd")); sendMsg = sendMsg.Replace("[预订产品]", tourModel.RouteName); sendMsg = sendMsg.Replace("[预订数量]", orderModel.AdultNum.ToString() + "成," + orderModel.ChildrenNum.ToString() + "儿"); #region 发送操作 EyouSoft.Model.SMSStructure.SendMessageInfo sendMessageInfo = new EyouSoft.Model.SMSStructure.SendMessageInfo(); sendMessageInfo.CompanyId = orderModel.Travel; sendMessageInfo.CompanyName = orderModel.TravelName; sendMessageInfo.UserId = this.SiteUserInfo.ID; sendMessageInfo.UserFullName = SiteUserInfo.ContactInfo.ContactName; sendMessageInfo.SMSContent = sendMsg; sendMessageInfo.SendTime = DateTime.Now; //添加要发送的手机号码 List <EyouSoft.Model.SMSStructure.AcceptMobileInfo> moblieList = new List <EyouSoft.Model.SMSStructure.AcceptMobileInfo>(); EyouSoft.Model.SMSStructure.AcceptMobileInfo mobileModel = new EyouSoft.Model.SMSStructure.AcceptMobileInfo(); mobileModel.IsEncrypt = false; if (tourComModel.ContactInfo != null) { mobileModel.Mobile = tourComModel.ContactInfo.Mobile; } moblieList.Add(mobileModel); sendMessageInfo.Mobiles = moblieList; //发送通道 EyouSoft.Model.SMSStructure.SMSChannel sendChannel = new EyouSoft.Model.SMSStructure.SMSChannelList()[Convert.ToInt32(SettingInfoModel.OrderSmsChannelIndex)]; sendMessageInfo.SendChannel = sendChannel; sendMessageInfo.SendType = EyouSoft.Model.SMSStructure.SendType.直接发送; EyouSoft.IBLL.SMSStructure.ISendMessage sBll = EyouSoft.BLL.SMSStructure.SendMessage.CreateInstance(); EyouSoft.Model.SMSStructure.SendResultInfo SendResultModel = sBll.Send(sendMessageInfo); SendResultModel = null; sendMessageInfo = null; #endregion } } #endregion return("ok"); } else { return("服务器忙,请稍后再试!"); } #endregion }
/// <summary> /// 发送订单预定短信,返回1成功,其它失败 /// </summary> /// <param name="info">订单短信信息业务实体</param> /// <returns></returns> public int SendOrderSMS(EyouSoft.Model.NewTourStructure.MOrderSmsInfo info) { if (info == null || string.IsNullOrEmpty(info.DSTCompanyId)) { return(-1); } if (string.IsNullOrEmpty(info.OrderId)) { return(-2); } EyouSoft.Model.SystemStructure.MSysSettingInfo setting = EyouSoft.BLL.SystemStructure.SystemInfo.CreateInstance().GetSysSetting(); if (setting == null || !setting.OrderSmsIsEnable) { return(-3); } EyouSoft.Model.NewTourStructure.MOrderSmsDstInfo dstInfo = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetOrderSmsDstInfo(info.DSTCompanyId); if (dstInfo == null) { return(-4); } if (dstInfo.DstPhones == null || dstInfo.DstPhones.Count < 1) { return(-5); } if (setting.OrderSmsCompanyTypes == null || !setting.OrderSmsCompanyTypes.Contains(dstInfo.DstCompanyType)) { return(-6); } if (info.OrderType == EyouSoft.Model.NewTourStructure.OrderSource.线路散拼订单) { string s = setting.OrderSmsTemplate; //信息替换 s = s.Replace("[预定公司]", info.BookCompanyName); s = s.Replace("[预定联系电话]", info.BookPhone); s = s.Replace("[预定出发时间]", info.BookLTime.ToString("yyyy-MM-dd")); s = s.Replace("[预定产品]", info.BookName); s = s.Replace("[预定数量]", info.BookNumber.ToString()); //收费和签约公司特有内容 int startIndex = s.IndexOf('{'); int endIndex = s.IndexOf('}'); if (startIndex > -1 && endIndex > -1 && startIndex < endIndex) { if (dstInfo.DstCompanyType == EyouSoft.Model.CompanyStructure.CompanyLev.签约商户 || dstInfo.DstCompanyType == EyouSoft.Model.CompanyStructure.CompanyLev.推荐商户) { s = s.Replace("{", string.Empty).Replace("}", string.Empty); } else { s = s.Substring(0, startIndex) + s.Substring(endIndex + 1); } } EyouSoft.Model.SMSStructure.SendMessageInfo message = new EyouSoft.Model.SMSStructure.SendMessageInfo(); List <EyouSoft.Model.SMSStructure.AcceptMobileInfo> mobiles = new List <EyouSoft.Model.SMSStructure.AcceptMobileInfo>(); foreach (var item in dstInfo.DstPhones) { if (!string.IsNullOrEmpty(item) && EyouSoft.Common.Utility.IsMobile(item)) { mobiles.Add(new EyouSoft.Model.SMSStructure.AcceptMobileInfo() { IsEncrypt = false, Mobile = item }); break; } } message.CompanyId = setting.OrderSmsCompanyId; message.CompanyName = string.Empty; message.Mobiles = mobiles; message.SendChannel = new EyouSoft.Model.SMSStructure.SMSChannelList()[setting.OrderSmsChannelIndex]; message.SendTime = DateTime.Now; message.SendType = EyouSoft.Model.SMSStructure.SendType.直接发送; message.SMSContent = s; //message.SMSContentSendComplete message.SMSType = 0; message.UserFullName = string.Empty; message.UserId = setting.OrderSmsUserId; var sendRet = Send(message); if (sendRet.IsSucceed) { return(1); } else { return(-7); } } return(-8); }