55 lines
2.1 KiB
C#
55 lines
2.1 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using WX.CRM.BLL.Sms;
|
||
using WX.CRM.Common;
|
||
using WX.CRM.Model.Entity;
|
||
|
||
namespace WX.CRM.CRMServices.SMS
|
||
{
|
||
public class SmsVerify
|
||
{
|
||
SMS_RESCODE_BL resCodeBll = new SMS_RESCODE_BL();
|
||
SMS_BATCHMSG_BL BatchMsgBiz = new SMS_BATCHMSG_BL();
|
||
public void Send()
|
||
{
|
||
try
|
||
{
|
||
Pager page_1 = new Pager { page = 1, rows = 660 };
|
||
Pager page_3 = new Pager { page = 3, rows = 340 };
|
||
var resCodeList_1 = resCodeBll.List(ref page_1, 1, 0);
|
||
var resCodeList_3 = resCodeBll.List(ref page_3, 3, 0);
|
||
var resCodeList = new List<SMS_RESCODE>();
|
||
if (resCodeList_1 != null && resCodeList_1.Count > 0)
|
||
{
|
||
resCodeList.AddRange(resCodeList_1);
|
||
}
|
||
if (resCodeList_3 != null && resCodeList_3.Count > 0)
|
||
{
|
||
resCodeList.AddRange(resCodeList_3);
|
||
}
|
||
if (resCodeList != null && resCodeList.Count > 0)
|
||
{
|
||
WX.CRM.Model.Entity.SMS_BATCHMSG info = new WX.CRM.Model.Entity.SMS_BATCHMSG();
|
||
info.SUBTYPEID = 600000653;
|
||
info.CLIENTCODE = "YZ";
|
||
info.CREATEUSER = 1257205534;
|
||
info.CTIME = DateTime.Now;
|
||
info.MESSAGE = "《早盘擒牛》9月15个涨停,邀您免.费体验,速点击http://m.gzszzy.com/m/@@code ,助力快速解套。【证.券之星】";
|
||
if (info.MESSAGE.IndexOf("@@code ") == -1)
|
||
info.MESSAGE = info.MESSAGE.Replace("@@code", "@@code ");
|
||
info.TYPECODE = "BATSMS0002"; //未定义
|
||
var lis = resCodeList.Select(m => m.CODE).ToList();
|
||
BatchMsgBiz.ImpotDt(info, lis, 300);
|
||
}
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
WX.CRM.Common.LogHelper.Error("WX.CRM.CRMServices.SMS.SmsVerify.Send:" + ex.Message + ex.StackTrace);
|
||
}
|
||
}
|
||
|
||
|
||
}
|
||
}
|