public int SetSmsUnitPrices(EyouSoft.SmsWeb.Model.MSmsAccountBase account, List <EyouSoft.SmsWeb.Model.MSmsChannelInfo> items) { //无权限使用此服务 if (!WebmasterSmsCenterApiSoapHeader.IsSafeCall) { return(0); } //短信账户错误 if (account == null || !new EyouSoft.SmsWeb.Bll.BSmsAccount().IsExists(account)) { return(-1); } //价格验证 if (items == null || items.Count == 0) { return(-2); } if (new EyouSoft.SmsWeb.Bll.BSmsAccount().SetSmsUnitPrice(account.AccountId, items) == 1) { return(1); } return(-3); }
/// <summary> /// 账户验证 /// </summary> /// <param name="account">账户信息</param> /// <returns></returns> public bool IsExists(EyouSoft.SmsWeb.Model.MSmsAccountBase account) { if (account == null || string.IsNullOrEmpty(account.AccountId) || string.IsNullOrEmpty(account.AppKey)) { return(false); } return(_dal.IsExists(account)); }
public Model.MSmsAccount GetSmsAccount(EyouSoft.SmsWeb.Model.MSmsAccountBase account) { //无权限使用此服务 if (!SmsCenterApiSoapHeader.IsSafeCall) { return(null); } //短信账户错误 if (account == null || !new EyouSoft.SmsWeb.Bll.BSmsAccount().IsExists(account)) { return(null); } var info = new Bll.BSmsAccount().GetFullSmsAccount(account.AccountId, account.AppKey); return(info); }