|
using JiepeiWMS.IServices;
|
using JiepeiWMS.Model.Models;
|
using JiepeiWMS.Services.BASE;
|
using JiepeiWMS.IRepository.Base;
|
using System;
|
|
namespace JiepeiWMS.Services
|
{
|
public class SmsLogServices : BaseServices<SmsLog>, ISmsLogServices
|
{
|
private readonly IBaseRepository<SmsLog> _dal;
|
public SmsLogServices(IBaseRepository<SmsLog> dal)
|
{
|
this._dal = dal;
|
base.BaseDal = dal;
|
}
|
|
/// <summary>
|
/// 短信推送添加日志
|
/// </summary>
|
/// <param name="UserId">员工ID</param>
|
/// <param name="Mobile">接收短信者</param>
|
/// <param name="SendType">发送类型说明</param>
|
/// <param name="content">发送内容</param>
|
/// <param name="ResponseInfo">返回状态</param>
|
/// <param name="SmsFrom">短信接入商</param>
|
/// <param name="BatchSendNo">短信批次号,只有在批量发送有意义。</param>
|
/// <returns></returns>
|
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);
|
|
}
|
}
|
}
|