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

新增阿里模板短信推送

parent 1af5099b
...@@ -24,7 +24,7 @@ namespace PushInfo.Act.DAL.MySql ...@@ -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 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 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"; 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 } }; Dictionary<string, object> condition = new Dictionary<string, object>{ { "@projectId", projectId } };
return PagedFetchAsync<Sys_Push>(selectSql, totalSql, condition, pageIndex,10).Result; return PagedFetchAsync<Sys_Push>(selectSql, totalSql, condition, pageIndex,10).Result;
......
...@@ -596,12 +596,12 @@ namespace PushInfo.Core.BLL ...@@ -596,12 +596,12 @@ namespace PushInfo.Core.BLL
{ {
try try
{ {
ConfirmSendTask(mapProPush, data); //ConfirmSendTask(mapProPush, data);
//if (mapProPush.Push_Style.IndexOf(((int)PushStyle.APP).ToString()) > -1) if (mapProPush.Push_Style.IndexOf(((int)PushStyle.APP).ToString()) > -1)
// MqNameTwo = MqName; MqNameTwo = MqName;
//else if (mapProPush.Push_Style.IndexOf(((int)PushStyle.极光App).ToString()) > -1) else if (mapProPush.Push_Style.IndexOf(((int)PushStyle.极光App).ToString()) > -1)
// MqNameTwo = MqNameUrora; MqNameTwo = MqNameUrora;
//ActiveMQHelper.CreateMQProducer(MqNameTwo, MQMode.Queue, new DataCenterMessage { ObjectID = "", MsgData = mapProPush.ToJson(), MsgSecondData = data.ToJson() }, sendDate); ActiveMQHelper.CreateMQProducer(MqNameTwo, MQMode.Queue, new DataCenterMessage { ObjectID = "", MsgData = mapProPush.ToJson(), MsgSecondData = data.ToJson() }, sendDate);
} }
catch (Exception e) catch (Exception e)
{ {
......
...@@ -82,6 +82,8 @@ namespace PushInfo.Core.BLL ...@@ -82,6 +82,8 @@ namespace PushInfo.Core.BLL
{ {
using (PushPlatform.Common.NewSmsService.SmsServiceClient sms = new PushPlatform.Common.NewSmsService.SmsServiceClient()) 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??"")); var r = sms.AliSendCode(smsProjectId, param.SmsMessageSigna, param.TemplateCode, param.Mobile, (param.TemplateParam??""));
smsresult = r; smsresult = r;
if (r=="OK") if (r=="OK")
......
...@@ -39,6 +39,7 @@ namespace PushPf.Api.Controllers ...@@ -39,6 +39,7 @@ namespace PushPf.Api.Controllers
} }
catch (Exception ex) catch (Exception ex)
{ {
LogHelper.Debug(JsonHelper.ToJson(valModel));
LogHelper.Error(ex); LogHelper.Error(ex);
model.DetailedStatus = DetailedStatusCode.Fail; model.DetailedStatus = DetailedStatusCode.Fail;
model.DetailedMessage = "异常,请联系管理员"; model.DetailedMessage = "异常,请联系管理员";
......
...@@ -29,7 +29,7 @@ namespace PushPlatform.Background.Areas.BackGround.Controllers ...@@ -29,7 +29,7 @@ namespace PushPlatform.Background.Areas.BackGround.Controllers
PageListModel<PushConfigResult> pageList = bll.GetPushTempletList(page, user.CurrentProjectId); PageListModel<PushConfigResult> pageList = bll.GetPushTempletList(page, user.CurrentProjectId);
ViewData["IS_ADMIN"] = true; ViewData["IS_ADMIN"] = true;
ViewData["PAGE_LIST"] = pageList.Data; ViewData["PAGE_LIST"] = pageList.Data;
ViewData["PAGE_COUNT"] = pageList.TotalPageCount + 1; ViewData["PAGE_COUNT"] = pageList.TotalPageCount;
ViewData["CURRENT_PAGE"] = pageList.CurrentPage; ViewData["CURRENT_PAGE"] = pageList.CurrentPage;
ViewData["PROJ_ID"] = ""; ViewData["PROJ_ID"] = "";
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<AssemblyName>PushPlatform.Background</AssemblyName> <AssemblyName>PushPlatform.Background</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews> <MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>false</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort /> <IISExpressSSLPort />
<IISExpressAnonymousAuthentication /> <IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication /> <IISExpressWindowsAuthentication />
...@@ -687,7 +687,7 @@ ...@@ -687,7 +687,7 @@
<AutoAssignPort>True</AutoAssignPort> <AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>19013</DevelopmentServerPort> <DevelopmentServerPort>19013</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath> <DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost/PushPlatform.Background</IISUrl> <IISUrl>http://localhost:19013/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication> <NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer> <UseCustomServer>False</UseCustomServer>
<CustomServerUrl> <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