Commit 6868fc54 authored by 席世权's avatar 席世权

新增阿里模板短信推送

parent 1af5099b
......@@ -24,7 +24,7 @@ namespace PushInfo.Act.DAL.MySql
{
string selectSql = @"select Id,Name_Des,Push_Target,Push_Style,Push_Title,Push_Body,Push_Type,Push_Cycle,Push_Month,Push_Which,Push_Action,Push_ActionType,Push_IosLink,Push_AndLink,Push_WebLink,Push_WechatLink,create_time
from sys_push
where Is_Deleted = 0 and PushSys_ProId = @projectId";
where Is_Deleted = 0 and PushSys_ProId = @projectId order by Create_Time desc";
string totalSql = @"select count(*) from sys_push where Is_Deleted = 0 and PushSys_ProId = @projectId";
Dictionary<string, object> condition = new Dictionary<string, object>{ { "@projectId", projectId } };
return PagedFetchAsync<Sys_Push>(selectSql, totalSql, condition, pageIndex,10).Result;
......
......@@ -596,12 +596,12 @@ namespace PushInfo.Core.BLL
{
try
{
ConfirmSendTask(mapProPush, data);
//if (mapProPush.Push_Style.IndexOf(((int)PushStyle.APP).ToString()) > -1)
// MqNameTwo = MqName;
//else if (mapProPush.Push_Style.IndexOf(((int)PushStyle.极光App).ToString()) > -1)
// MqNameTwo = MqNameUrora;
//ActiveMQHelper.CreateMQProducer(MqNameTwo, MQMode.Queue, new DataCenterMessage { ObjectID = "", MsgData = mapProPush.ToJson(), MsgSecondData = data.ToJson() }, sendDate);
//ConfirmSendTask(mapProPush, data);
if (mapProPush.Push_Style.IndexOf(((int)PushStyle.APP).ToString()) > -1)
MqNameTwo = MqName;
else if (mapProPush.Push_Style.IndexOf(((int)PushStyle.极光App).ToString()) > -1)
MqNameTwo = MqNameUrora;
ActiveMQHelper.CreateMQProducer(MqNameTwo, MQMode.Queue, new DataCenterMessage { ObjectID = "", MsgData = mapProPush.ToJson(), MsgSecondData = data.ToJson() }, sendDate);
}
catch (Exception e)
{
......
......@@ -82,6 +82,8 @@ namespace PushInfo.Core.BLL
{
using (PushPlatform.Common.NewSmsService.SmsServiceClient sms = new PushPlatform.Common.NewSmsService.SmsServiceClient())
{
if (string.IsNullOrEmpty(param.TemplateParam))
param.TemplateParam = param.PushBody;
var r = sms.AliSendCode(smsProjectId, param.SmsMessageSigna, param.TemplateCode, param.Mobile, (param.TemplateParam??""));
smsresult = r;
if (r=="OK")
......
......@@ -39,6 +39,7 @@ namespace PushPf.Api.Controllers
}
catch (Exception ex)
{
LogHelper.Debug(JsonHelper.ToJson(valModel));
LogHelper.Error(ex);
model.DetailedStatus = DetailedStatusCode.Fail;
model.DetailedMessage = "异常,请联系管理员";
......
......@@ -29,7 +29,7 @@ namespace PushPlatform.Background.Areas.BackGround.Controllers
PageListModel<PushConfigResult> pageList = bll.GetPushTempletList(page, user.CurrentProjectId);
ViewData["IS_ADMIN"] = true;
ViewData["PAGE_LIST"] = pageList.Data;
ViewData["PAGE_COUNT"] = pageList.TotalPageCount + 1;
ViewData["PAGE_COUNT"] = pageList.TotalPageCount;
ViewData["CURRENT_PAGE"] = pageList.CurrentPage;
ViewData["PROJ_ID"] = "";
......
......@@ -17,7 +17,7 @@
<AssemblyName>PushPlatform.Background</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>false</UseIISExpress>
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
......@@ -687,7 +687,7 @@
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>19013</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost/PushPlatform.Background</IISUrl>
<IISUrl>http://localhost:19013/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment