WYB
2021-03-22 91b8cdad021ab052e4991f3d41834a6f0ddc36b8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
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);
 
        }
    }
}