Commit 51abdfb0 authored by 席世权's avatar 席世权

升级推送服务

parent 963257d7
......@@ -4,7 +4,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
......
......@@ -134,7 +134,13 @@ namespace PushInfo.Core.BLL
{
if (task != null)
{
if (task.Push_Type == (int)PushType.小时)
if (task.Push_Type == (int)PushType.分钟)
{
//间隔时间为小时
task.Exec_Time = task.Exec_Time.AddMinutes(task.Push_Cycle.Value);
task.Exec_Status = (int)ExecuteStatus.循环执行中;
}
else if (task.Push_Type == (int)PushType.小时)
{
//间隔时间为小时
task.Exec_Time = task.Exec_Time.AddHours(task.Push_Cycle.Value);
......@@ -185,7 +191,7 @@ namespace PushInfo.Core.BLL
/// <param name="pushStype">推送类型</param>
/// <param name="result"></param>
/// <returns></returns>
public APIResult<string> InsertPushMessage(Map_Project_Push mapProPush, DataMessage data,string pushStype,APIResult<string> result)
public APIResult<string> InsertPushMessage(Map_Project_Push mapProPush, DataMessage data, string pushStype, APIResult<string> result)
{
try
{
......@@ -214,7 +220,7 @@ namespace PushInfo.Core.BLL
pMsave.Create_User = "admin";
pMsave.Push_Style = pushStype;
pMsave.Is_Successed = result.Result;
if (pushStype == ((int)PushStyle.APP).ToString())
if (pushStype == ((int)PushStyle.APP).ToString() || pushStype == ((int)PushStyle.极光App).ToString())
{
pMsave.Send_Number = data.clientID;
}
......@@ -226,7 +232,7 @@ namespace PushInfo.Core.BLL
{
pMsave.Send_Number = data.openId;
}
if(pushStype == ((int)PushStyle.站内推送).ToString())
if (pushStype == ((int)PushStyle.站内推送).ToString())
{
pMsave.Push_Style = "5";
}
......@@ -236,10 +242,10 @@ namespace PushInfo.Core.BLL
}
pPushBll.AddPushMeddage(pMsave);
}
catch(Exception ex)
catch (Exception ex)
{
LogHelper.Error(ex);
SmsBLL.PushErrorInfo(mapProPush.PushSys_ProId, mapProPush.Name_Des+"用户Id:"+data.userId + "在保存进日志的时候发生异常,请查询原因。");
SmsBLL.PushErrorInfo(mapProPush.PushSys_ProId, mapProPush.Name_Des + "用户Id:" + data.userId + "在保存进日志的时候发生异常,请查询原因。");
result.Msg = "抛出异常,请查询日志!";
result.Result = 0;
result.code = 1;
......@@ -394,7 +400,6 @@ namespace PushInfo.Core.BLL
result.Result = 0;
}
}
if (mapProPush.Push_Style.IndexOf(((int) PushStyle.站内推送).ToString()) > -1) //有站内推送
{
pushStype = ((int) PushStyle.站内推送).ToString();
......@@ -404,7 +409,6 @@ namespace PushInfo.Core.BLL
LogHelper.Info(Data.realName + "-" + Data.loginName + "站内推送记录失败");
}
}
if (mapProPush.Push_Style.IndexOf(((int) PushStyle.socket).ToString()) > -1)
{
if (mapProPush.Push_Style.IndexOf(((int) PushStyle.站内推送).ToString()) < 0)
......@@ -418,7 +422,6 @@ namespace PushInfo.Core.BLL
}
}
}
if(mapProPush.Push_Style.IndexOf(((int)PushStyle.邮件).ToString()) > -1)
{
pushStype = ((int)PushStyle.邮件).ToString();
......@@ -438,6 +441,33 @@ namespace PushInfo.Core.BLL
result.Result = 0;
}
}
if (mapProPush.Push_Style.IndexOf(((int)PushStyle.极光App).ToString()) > -1) //有极光App推送
{
pushStype = ((int)PushStyle.极光App).ToString();
var appCfg = sendCfgList.Where(x => x.Type == (int)SendCfgType.APP).FirstOrDefault();
if (appCfg != null)
{
AppPushConfig appCfgModel = JsonUtil.ConvertToObject<AppPushConfig>(appCfg.Config_Info);
if (!string.IsNullOrEmpty(Data.clientID) && !string.IsNullOrEmpty(Data.clientType))
{
result = Send_PushJg(appCfgModel, Data.clientID, Data.clientType, mapProPush.Push_Title, mapProPush.Push_Body, mapProPush.Push_AndLink, mapProPush.Push_IosLink);
}
else
{
result.Result = 0;
result.Msg = "极光用户的推送设备号信息不全:clientID:" + Data.clientID + ";clientType:" + Data.clientType;
}
mapProPush.Return_Code = result.Msg;
result = InsertPushMessage(mapProPush, Data, pushStype, result);
if (result.Result == 0)
{ LogHelper.Info(mapProPush.Name_Des + Data.realName + "-" + Data.loginName + "手机推送记录失败"); result.Result = 0; };
}
else
{
LogHelper.Info(mapProPush.Name_Des + Data.realName + "-" + Data.loginName + "手机推送记录失败原因:未查询到配置");
result.Result = 0;
}
}
}
catch (Exception ex)
{
......@@ -476,6 +506,48 @@ namespace PushInfo.Core.BLL
else
return bllSms.PushSingle(appCfgModel, clientId, 0, pushTitle, pushBody, andActionLink);
}
/// <summary>
/// 极光App推送
/// </summary>
/// <param name="appCfgModel"></param>
/// <param name="clientId"></param>
/// <param name="clientType"></param>
/// <param name="pushTitle"></param>
/// <param name="pushBody"></param>
/// <param name="andActionLink"></param>
/// <param name="iosActionLink"></param>
/// <returns></returns>
public APIResult<string> Send_PushJg(AppPushConfig appCfgModel, string clientId, string clientType, string pushTitle, string pushBody, string andActionLink, string iosActionLink)
{
var message = new JiguangPushMessage(appCfgModel.AppKey, appCfgModel.MasterSecret);
Dictionary<string, object> extras = new Dictionary<string, object>();
if (clientType.ToLower() == "ios")
{
if (!string.IsNullOrEmpty(iosActionLink))
{
iosActionLink = iosActionLink.Replace("[titleInfo]", pushTitle);
iosActionLink = iosActionLink.Replace("[bodyInfo]", pushBody);
extras = JsonHelper.ToObject<Dictionary<string, object>>(iosActionLink);
}
}
else if (!string.IsNullOrEmpty(andActionLink))
{
extras = JsonHelper.ToObject<Dictionary<string, object>>(andActionLink);
}
string intent = "";
if (extras.Keys.Contains("intent"))
{
intent = extras["intent"].ToString();
extras.Remove("intent");
}
bool isProd = false;
if (System.Configuration.ConfigurationManager.AppSettings["IsProd"] == "1")
isProd = true;
return message.SendPush(new Jiguang.JPush.Model.Audience { RegistrationId = new List<string> { clientId } },
pushTitle, pushBody, intent,
extras);
}
#endregion
#region 发送短信通知
......@@ -503,10 +575,10 @@ namespace PushInfo.Core.BLL
{
try
{
//ConfirmSendTask(mapProPush, data);
if (mapProPush.Push_Style.IndexOf(((int)PushStyle.APP).ToString()) > -1)
MqNameTwo = MqName;
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;
//ActiveMQHelper.CreateMQProducer(MqNameTwo, MQMode.Queue, new DataCenterMessage { ObjectID = "", MsgData = mapProPush.ToJson(), MsgSecondData = data.ToJson()}, sendDate);
}
catch (Exception e)
{
......
......@@ -227,7 +227,18 @@ namespace PushInfo.Core.Quartz.Jobs
{
int minute = startTime.Minute;
int hous = startTime.Hour;
if (task.Push_Type == (int)PushType.小时)
if(task.Push_Type == (int)PushType.分钟)
{
//间隔时间为分钟
trigger = TriggerBuilder.Create()
.WithIdentity(rs.data.ToString(), Group)
.WithSimpleSchedule(x => x.WithIntervalInMinutes(task.Push_Cycle ?? 0).RepeatForever())
.StartAt(startTime)
.Build();
LogHelper.Debug("设置任务【" + task.Name_Des + "】,周期类型【分钟】,执行周期:【" + (task.Push_Cycle ?? 0) + "】");
}
else if (task.Push_Type == (int)PushType.小时)
{
//间隔时间为小时
trigger = TriggerBuilder.Create()
......
......@@ -5,84 +5,78 @@
-->
<configuration>
<connectionStrings>
<add name="WriteConnStr" connectionString="Server=192.168.0.39;Database=db_ashermed_push;Uid=root;Pwd=root;"/>
<add name="ReadConnStr" connectionString="Server=192.168.0.39;Database=db_ashermed_push;Uid=root;Pwd=root;"/>
<add name="WriteConnStr" connectionString="Server=192.168.0.39;Database=db_ashermed_push;Uid=root;Pwd=root;" />
<add name="ReadConnStr" connectionString="Server=192.168.0.39;Database=db_ashermed_push;Uid=root;Pwd=root;" />
<!--<add name="WriteConnStr" connectionString="Server=101.132.234.102;Database=db_ashermed_push;Uid=iis;Pwd=iis;"/>
<add name="ReadConnStr" connectionString="Server=101.132.234.102;Database=db_ashermed_push;Uid=iis;Pwd=iis;"/>-->
</connectionStrings>
<appSettings>
<add key="DB" value="MySql"/>
<add key="DB" value="MySql" />
<add key="pushProjectId" value="8a3babf9-5b85-4bad-afcd-b6d39c1b8555"/>
<add key="smsProjectId" value="8a3babf9-5b85-4bad-afcd-b6d39c1b8555"/>
<add key="SMSMessage" value="【91Trial】您的验证码为:{0}(此验证码15分钟内有效)"/>
<add key="SMSMessageSigna" value="【91Trial】{0}"/>
<add key="TokenId" value="eee3ee56-a04d-11e6-8893-00155d00f055"/>
<add key="pushProjectId" value="8a3babf9-5b85-4bad-afcd-b6d39c1b8555" />
<add key="smsProjectId" value="8a3babf9-5b85-4bad-afcd-b6d39c1b8555" />
<add key="SMSMessage" value="【91Trial】您的验证码为:{0}(此验证码15分钟内有效)" />
<add key="SMSMessageSigna" value="【91Trial】{0}" />
<add key="TokenId" value="eee3ee56-a04d-11e6-8893-00155d00f055" />
<add key="webpages:Version" value="3.0.0.0"/>
<add key="webpages:Enabled" value="false"/>
<add key="ClientValidationEnabled" value="true"/>
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5"/>
<httpRuntime targetFramework="4.5"/>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<httpModules>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
</httpModules>
</system.web>
<system.webServer>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0"/>
<remove name="OPTIONSVerbHandler"/>
<remove name="TRACEVerbHandler"/>
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler"
preCondition="integratedMode,runtimeVersionv4.0"/>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
<validation validateIntegratedModeConfiguration="false"/>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<remove name="ApplicationInsightsWebTracking"/>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"
preCondition="managedHandler"/>
<remove name="ApplicationInsightsWebTracking" />
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
</modules>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed"/>
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0"/>
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0"/>
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.5.2.14234" newVersion="1.5.2.14234"/>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
</compilers>
</system.codedom>
</configuration>
......@@ -2,33 +2,33 @@
<configuration>
<configSections>
<!--quartz配置-->
<section name="quartz" type="System.Configuration.NameValueSectionHandler, System, Version=2.6.0.0,Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="quartz" type="System.Configuration.NameValueSectionHandler, System, Version=2.6.0.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<sectionGroup name="common">
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging"/>
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
</sectionGroup>
<!--quartz配置结束-->
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<appSettings>
<add key="DB" value="MySql"/>
<add key="DB" value="MySql" />
<add key="pushProjectId" value="8a3babf9-5b85-4bad-afcd-b6d39c1b8555"/>
<add key="smsProjectId" value="8a3babf9-5b85-4bad-afcd-b6d39c1b8555"/>
<add key="SMSMessage" value="【91Trial】您的验证码为:{0}(此验证码15分钟内有效)"/>
<add key="SMSMessageSigna" value="【91Trial】{0}"/>
<add key="TokenId" value="eee3ee56-a04d-11e6-8893-00155d00f055"/>
<add key="pushProjectId" value="8a3babf9-5b85-4bad-afcd-b6d39c1b8555" />
<add key="smsProjectId" value="8a3babf9-5b85-4bad-afcd-b6d39c1b8555" />
<add key="SMSMessage" value="【91Trial】您的验证码为:{0}(此验证码15分钟内有效)" />
<add key="SMSMessageSigna" value="【91Trial】{0}" />
<add key="TokenId" value="eee3ee56-a04d-11e6-8893-00155d00f055" />
<add key="ActiveMQ" value="tcp://47.100.208.49:61616/"/>
<add key="ActiveMQ" value="tcp://47.100.208.49:61616/" />
<add key="WechatTokenUrl" value="https://tools.ashermed.com/Wechat/Token/"/>
<add key="WechatTokenUrl" value="https://tools.ashermed.com/Wechat/Token/" />
</appSettings>
<connectionStrings>
<add name="WriteConnStr" connectionString="Server=192.168.0.39;Database=db_ashermed_push;Uid=user;Pwd=123456;"/>
<add name="ReadConnStr" connectionString="Server=192.168.0.39;Database=db_ashermed_push;Uid=user;Pwd=123456;"/>
<add name="PushPlatformContext" connectionString="Server=192.168.0.39;Database=db_ashermed_push;Uid=user;Pwd=123456;"/>
<add name="WriteConnStr" connectionString="Server=192.168.0.62;Database=db_ashermed_push;Uid=user;Pwd=Asher1234;"/>
<add name="ReadConnStr" connectionString="Server=192.168.0.62;Database=db_ashermed_push;Uid=user;Pwd=Asher1234;"/>
<add name="PushPlatformContext" connectionString="Server=192.168.0.62;Database=db_ashermed_push;Uid=user;Pwd=Asher1234;"/>
<!--<add name="WriteConnStr" connectionString="Server=101.132.234.102;Database=db_ashermed_push;Uid=iis;Pwd=iis;"/>
<add name="ReadConnStr" connectionString="Server=101.132.234.102;Database=db_ashermed_push;Uid=iis;Pwd=iis;"/>
<add name="PushPlatformContext" connectionString="Server=101.132.234.102;Database=db_ashermed_push;Uid=iis;Pwd=iis;"/>-->
......@@ -43,39 +43,31 @@
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://tools.ashermed.com/WeChatPlatForm/WeChatService.asmx"
binding="basicHttpBinding" bindingConfiguration="WeChatServiceSoap"
contract="WeChatService.WeChatServiceSoap" name="WeChatServiceSoap" />
<endpoint address="http://tools.ashermed.com/SendMsg/Service/SMSService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISMSService"
contract="SmsService.ISMSService" name="BasicHttpBinding_ISMSService" />
<endpoint address="http://channel.ashermed.com/SmsService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISmsService"
contract="NewSmsService.ISmsService" name="BasicHttpBinding_ISmsService" />
<endpoint address="http://xtest.ashermed.cn/MIPFService/EdcMipfService.asmx"
binding="basicHttpBinding" bindingConfiguration="EdcMipfServiceSoap"
contract="MIPFService.EdcMipfServiceSoap" name="EdcMipfServiceSoap" />
<endpoint address="http://tools.ashermed.com/WeChatPlatForm/WeChatService.asmx" binding="basicHttpBinding" bindingConfiguration="WeChatServiceSoap" contract="WeChatService.WeChatServiceSoap" name="WeChatServiceSoap" />
<endpoint address="http://tools.ashermed.com/SendMsg/Service/SMSService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISMSService" contract="SmsService.ISMSService" name="BasicHttpBinding_ISMSService" />
<endpoint address="http://channel.ashermed.com/SmsService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISmsService" contract="NewSmsService.ISmsService" name="BasicHttpBinding_ISmsService" />
<endpoint address="http://xtest.ashermed.cn/MIPFService/EdcMipfService.asmx" binding="basicHttpBinding" bindingConfiguration="EdcMipfServiceSoap" contract="MIPFService.EdcMipfServiceSoap" name="EdcMipfServiceSoap" />
</client>
</system.serviceModel>
<common>
<logging>
<factoryAdapter type="Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter, Common.Logging">
<arg key="showLogName" value="true"/>
<arg key="showDataTime" value="true"/>
<arg key="level" value="INFO"/>
<arg key="dateTimeFormat" value="HH:mm:ss:fff"/>
<arg key="showLogName" value="true" />
<arg key="showDataTime" value="true" />
<arg key="level" value="INFO" />
<arg key="dateTimeFormat" value="HH:mm:ss:fff" />
</factoryAdapter>
</logging>
</common>
<quartz>
<add key="quartz.scheduler.instanceName" value="ExampleDefaultQuartzScheduler"/>
<add key="quartz.scheduler.instanceName" value="ExampleDefaultQuartzScheduler" />
<add key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz"/>
<add key="quartz.threadPool.threadCount" value="20"/>
<add key="quartz.threadPool.threadPriority" value="2"/>
<add key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz" />
<add key="quartz.threadPool.threadCount" value="20" />
<add key="quartz.threadPool.threadPriority" value="2" />
<add key="quartz.jobStore.misfireThreshold" value="60000"/>
<add key="quartz.jobStore.type" value="Quartz.Simpl.RAMJobStore, Quartz"/>
<add key="quartz.jobStore.misfireThreshold" value="60000" />
<add key="quartz.jobStore.type" value="Quartz.Simpl.RAMJobStore, Quartz" />
<!-- sample configuration based db provider -->
<!--<add key="quartz.dbprovider.customProvider.productName" value="Microsoft SQL Server, provider V2.0.0.0 in framework .NET V2.0"/>
......@@ -96,8 +88,8 @@
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
......
......@@ -47,6 +47,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Core" />
......@@ -79,6 +82,7 @@
<None Include="App.config">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ProjectInstaller.resx">
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
</packages>
\ No newline at end of file
......@@ -72,6 +72,7 @@
<div class="main_info_top time-btn-cg">
<button class="@(Model.Push_Type == 0 ? "btn btn-default btn-primary" : "btn btn-default")" type="button" value="0">触发</button>
<button class="@(Model.Push_Type == 1 ? "btn btn-default btn-primary" : "btn btn-default")" sel_name="s_once" type="button" value="1">一次</button>
<button class="@(Model.Push_Type == 6 ? "btn btn-default btn-primary" : "btn btn-default")" sel_name="s_minute" type="button" value="6">分钟</button>
<button class="@(Model.Push_Type == 2 ? "btn btn-default btn-primary" : "btn btn-default")" sel_name="s_hour" type="button" value="2">小时</button>
<button class="@(Model.Push_Type == 3 ? "btn btn-default btn-primary" : "btn btn-default")" sel_name="s_day" type="button" value="3">每天</button>
<button class="@(Model.Push_Type == 4 ? "btn btn-default btn-primary" : "btn btn-default")" sel_name="s_week" type="button" value="4">每周</button>
......@@ -87,6 +88,13 @@
</div>
</div>
</div>
<div class="form-inline" show_name="s_minute" style="@(Model.Push_Type == 6 ? string.Empty:"display:none;")">
<div class="form-group">
每隔
<input type="text" required="required" class="form-control" name="Push_Cycle" value="@(Model.Push_Type == 6 ? Model.Push_Cycle.ToString() : string.Empty)" />
分钟运行一次
</div>
</div>
<div class="form-inline" show_name="s_hour" style="@(Model.Push_Type == 2 ? string.Empty:"display:none;")">
<div class="form-group">
每隔
......
......@@ -81,7 +81,8 @@
</div>
</div>
<script>
function dataSubmit(e,variable) {
function dataSubmit(e, variable) {
debugger;
this.$this = $(e);
var flag = dataSubmit.formVerify();
if (flag == 1) {
......
......@@ -17,7 +17,7 @@
<AssemblyName>PushPlatform.Background</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>true</UseIISExpress>
<UseIISExpress>false</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
......@@ -687,7 +687,7 @@
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>19013</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:19013/</IISUrl>
<IISUrl>http://localhost/PushPlatform.Background</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
......
......@@ -50,6 +50,7 @@
<add key="ActiveMQ" value="tcp://47.100.208.49:61616/"/>
<add key="WechatTokenUrl" value="https://tools.ashermed.com/Wechat/Token/"/>
<add key="IsProd" value="1"/>
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
......
......@@ -20,6 +20,8 @@ namespace PushPlatform.Common.Enumerate
[Description("系统通知")]
站内推送 = 5,
[Description("邮件通知")]
邮件 = 6
邮件 = 6,
[Description("极光App通知")]
极光App = 7
}
}
......@@ -13,6 +13,7 @@ namespace PushPlatform.Common.Enumerate
小时 = 2,
= 3,
= 4,
= 5
= 5,
分钟 = 6
}
}
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<appSettings>
<add key="DB" value="MySql"/>
<add key="DB" value="MySql" />
<add key="pushProjectId" value="8a3babf9-5b85-4bad-afcd-b6d39c1b8555"/>
<add key="smsProjectId" value="8a3babf9-5b85-4bad-afcd-b6d39c1b8555"/>
<add key="SMSMessage" value="【91Trial】您的验证码为:{0}(此验证码15分钟内有效)"/>
<add key="SMSMessageSigna" value="【91Trial】{0}"/>
<add key="TokenId" value="eee3ee56-a04d-11e6-8893-00155d00f055"/>
<add key="pushProjectId" value="8a3babf9-5b85-4bad-afcd-b6d39c1b8555" />
<add key="smsProjectId" value="8a3babf9-5b85-4bad-afcd-b6d39c1b8555" />
<add key="SMSMessage" value="【91Trial】您的验证码为:{0}(此验证码15分钟内有效)" />
<add key="SMSMessageSigna" value="【91Trial】{0}" />
<add key="TokenId" value="eee3ee56-a04d-11e6-8893-00155d00f055" />
<!--<add key="ActiveMQ" value="tcp://172.19.217.102:61616/"/>-->
<add key="ActiveMQ" value="tcp://47.100.208.49:61616/"/>
<add key="ActiveMQ" value="tcp://47.100.208.49:61616/" />
<add key="WechatTokenUrl" value="https://tools.ashermed.com/Wechat/Token/"/>
<add key="WechatTokenUrl" value="https://tools.ashermed.com/Wechat/Token/" />
</appSettings>
<connectionStrings>
<!--<add name="WriteConnStr" connectionString="Server=192.168.0.39;Database=db_ashermed_push;Uid=user;Pwd=123456;"/>
<add name="ReadConnStr" connectionString="Server=192.168.0.39;Database=db_ashermed_push;Uid=user;Pwd=123456;"/>
<add name="PushPlatformContext" connectionString="Server=192.168.0.39;Database=db_ashermed_push;Uid=user;Pwd=123456;"/>-->
<add name="WriteConnStr" connectionString="Server=101.132.234.102;Database=db_ashermed_push;Uid=iis;Pwd=iis;"/>
<add name="ReadConnStr" connectionString="Server=101.132.234.102;Database=db_ashermed_push;Uid=iis;Pwd=iis;"/>
<add name="PushPlatformContext" connectionString="Server=101.132.234.102;Database=db_ashermed_push;Uid=iis;Pwd=iis;"/>
<add name="WriteConnStr" connectionString="Server=101.132.234.102;Database=db_ashermed_push;Uid=iis;Pwd=iis;" />
<add name="ReadConnStr" connectionString="Server=101.132.234.102;Database=db_ashermed_push;Uid=iis;Pwd=iis;" />
<add name="PushPlatformContext" connectionString="Server=101.132.234.102;Database=db_ashermed_push;Uid=iis;Pwd=iis;" />
</connectionStrings>
<system.serviceModel>
<bindings>
......@@ -36,18 +36,18 @@
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://tools.ashermed.com/WeChatPlatForm/WeChatService.asmx"
binding="basicHttpBinding" bindingConfiguration="WeChatServiceSoap"
contract="WeChatService.WeChatServiceSoap" name="WeChatServiceSoap" />
<endpoint address="http://tools.ashermed.com/SendMsg/Service/SMSService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISMSService"
contract="SmsService.ISMSService" name="BasicHttpBinding_ISMSService" />
<endpoint address="http://channel.ashermed.com/SmsService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISmsService"
contract="NewSmsService.ISmsService" name="BasicHttpBinding_ISmsService" />
<endpoint address="http://xtest.ashermed.cn/MIPFService/EdcMipfService.asmx"
binding="basicHttpBinding" bindingConfiguration="EdcMipfServiceSoap"
contract="MIPFService.EdcMipfServiceSoap" name="EdcMipfServiceSoap" />
<endpoint address="http://tools.ashermed.com/WeChatPlatForm/WeChatService.asmx" binding="basicHttpBinding" bindingConfiguration="WeChatServiceSoap" contract="WeChatService.WeChatServiceSoap" name="WeChatServiceSoap" />
<endpoint address="http://tools.ashermed.com/SendMsg/Service/SMSService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISMSService" contract="SmsService.ISMSService" name="BasicHttpBinding_ISMSService" />
<endpoint address="http://channel.ashermed.com/SmsService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISmsService" contract="NewSmsService.ISmsService" name="BasicHttpBinding_ISmsService" />
<endpoint address="http://xtest.ashermed.cn/MIPFService/EdcMipfService.asmx" binding="basicHttpBinding" bindingConfiguration="EdcMipfServiceSoap" contract="MIPFService.EdcMipfServiceSoap" name="EdcMipfServiceSoap" />
</client>
</system.serviceModel>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
\ No newline at end of file
......@@ -28,11 +28,11 @@ namespace PushTest
static void Main(string[] args)
{
var message = new JiguangPushMessage("298ec6f7cdcdee87a3faf64b", "36dd48a9028eeb4471acec46");
message.SendPush(new Jiguang.JPush.Model.Audience { RegistrationId = new List<string> { "1a0018970a578514295" } }, // android: 1a0018970a578514295, ios: 161a3797c8f24d790c1
"上海保供物资管理意见1700", "备用手机号避免因注册1700",
//"intent:#Intent;action=android.intent.action.MAIN;end",
"intent:#Intent;action=android.intent.action.MAIN;component=com.aisha.headache.ui.activity.SplashActivity;S.key1=\"哈哈\";i.key2=2;end",
new Dictionary<string, object> { { "project_id", "9bfc78a8-6d2e-47b9-94cb-c3f40dfd9dc7" } });
var resylt = message.SendPush(new Jiguang.JPush.Model.Audience { RegistrationId = new List<string> { "13065ffa4efe527f388" } }, // android: 1a0018970a578514295, ios: 161a3797c8f24d790c1
"我的头痛日记", "您的头痛时间已持续72小时,请确认是否已结束?点击确认>>",
"intent:#Intent;action=android.intent.action.MAIN;component=com.aisha.headache.ui.activity.SplashActivity;",
//"intent:#Intent;action=android.intent.action.MAIN;component=com.aisha.headache.ui.activity.SplashActivity;S.key1=\"哈哈\";i.key2=2;end",
new Dictionary<string, object> { { "project_id", "9bfc78a8-6d2e-47b9-94cb-c3f40dfd9dc7" } },true);
var field1 = "<field>501a4360-5648-45be-8aaa-935d5f6673c3</field>"; //体重
var field2 = "<field>c7142c7b-2372-4a79-8626-6ae218e9ae0b</field>"; //身高
......
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