using JiepeiWMS.IServices; using JiepeiWMS.Model.Models; using JiepeiWMS.Services.BASE; using JiepeiWMS.IRepository.Base; using System; namespace JiepeiWMS.Services { public class SmsLogServices : BaseServices, ISmsLogServices { private readonly IBaseRepository _dal; public SmsLogServices(IBaseRepository dal) { this._dal = dal; base.BaseDal = dal; } /// /// 短信推送添加日志 /// /// 员工ID /// 接收短信者 /// 发送类型说明 /// 发送内容 /// 返回状态 /// 短信接入商 /// 短信批次号,只有在批量发送有意义。 /// public int AddSmssLog(int UserId, string Mobile, string SendType, string content,string ResponseInfo,string SmsFrom,string BatchSendNo) { var sql = string.Format(@"INSERT INTO dbo.[SmsLog] ([UserId], [Mobile], [SendType], [Content], [SendTime], [ResponseInfo], [SmsFrom], [BatchSendNo])VALUES ({0},'{1}','{2}','{3}','{4}','{5}','{6}','{7}')", UserId, Mobile, SendType, content, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),ResponseInfo ,SmsFrom,BatchSendNo ); return BaseDal.ExecuteSqlCommand(sql); } } }