Commit 9022cbb5 authored by liudong1993's avatar liudong1993
parents 6b6cc7ef fe7e17f0
...@@ -160,6 +160,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "REBORN.Module.PPTModule", " ...@@ -160,6 +160,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "REBORN.Module.PPTModule", "
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "REBORN.Services.AlipayCommerceService", "REBORN.Services.AlipayCommerceService\REBORN.Services.AlipayCommerceService.csproj", "{7AA3BA7D-7E2A-4F8E-BC6F-1B903DD8DFD9}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "REBORN.Services.AlipayCommerceService", "REBORN.Services.AlipayCommerceService\REBORN.Services.AlipayCommerceService.csproj", "{7AA3BA7D-7E2A-4F8E-BC6F-1B903DD8DFD9}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "REBORN.HuaTuQUART", "REBORN.HuaTuQUART\REBORN.HuaTuQUART.csproj", "{FF7660D5-90CA-4239-9E8B-5A23F34DBAF1}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
...@@ -426,6 +428,10 @@ Global ...@@ -426,6 +428,10 @@ Global
{7AA3BA7D-7E2A-4F8E-BC6F-1B903DD8DFD9}.Debug|Any CPU.Build.0 = Debug|Any CPU {7AA3BA7D-7E2A-4F8E-BC6F-1B903DD8DFD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7AA3BA7D-7E2A-4F8E-BC6F-1B903DD8DFD9}.Release|Any CPU.ActiveCfg = Release|Any CPU {7AA3BA7D-7E2A-4F8E-BC6F-1B903DD8DFD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7AA3BA7D-7E2A-4F8E-BC6F-1B903DD8DFD9}.Release|Any CPU.Build.0 = Release|Any CPU {7AA3BA7D-7E2A-4F8E-BC6F-1B903DD8DFD9}.Release|Any CPU.Build.0 = Release|Any CPU
{FF7660D5-90CA-4239-9E8B-5A23F34DBAF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF7660D5-90CA-4239-9E8B-5A23F34DBAF1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF7660D5-90CA-4239-9E8B-5A23F34DBAF1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF7660D5-90CA-4239-9E8B-5A23F34DBAF1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
...@@ -492,6 +498,7 @@ Global ...@@ -492,6 +498,7 @@ Global
{2AD84624-F9C6-498F-9F6C-282F4018A943} = {E11B04D0-CE75-4339-BB3D-9752FF101351} {2AD84624-F9C6-498F-9F6C-282F4018A943} = {E11B04D0-CE75-4339-BB3D-9752FF101351}
{715607F5-9050-4F94-AB98-B0B73C6073A6} = {B646CF37-90E6-4130-8467-62CB2B2C788F} {715607F5-9050-4F94-AB98-B0B73C6073A6} = {B646CF37-90E6-4130-8467-62CB2B2C788F}
{7AA3BA7D-7E2A-4F8E-BC6F-1B903DD8DFD9} = {E11B04D0-CE75-4339-BB3D-9752FF101351} {7AA3BA7D-7E2A-4F8E-BC6F-1B903DD8DFD9} = {E11B04D0-CE75-4339-BB3D-9752FF101351}
{FF7660D5-90CA-4239-9E8B-5A23F34DBAF1} = {E6DB58DA-96EC-4C12-99F5-E70D45091422}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EE4F9A23-3AA4-430B-9021-32060E109663} SolutionGuid = {EE4F9A23-3AA4-430B-9021-32060E109663}
......
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Configuration;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
...@@ -72,6 +73,10 @@ namespace REBORN.Common.EMail ...@@ -72,6 +73,10 @@ namespace REBORN.Common.EMail
EMailConfigManager.Instance.AddOrUpdateConfig("pptist", pptistConfig); EMailConfigManager.Instance.AddOrUpdateConfig("pptist", pptistConfig);
var mailConfig = Config.GetAppSetting("MailConfig"); var mailConfig = Config.GetAppSetting("MailConfig");
if (string.IsNullOrWhiteSpace(mailConfig))
{
mailConfig= ConfigurationManager.AppSettings["MailConfig"];
}
if (!string.IsNullOrWhiteSpace(mailConfig)) if (!string.IsNullOrWhiteSpace(mailConfig))
{ {
var mailConfigList = JsonHelper.DeserializeObject<List<MailConfig_Extend>>(mailConfig); var mailConfigList = JsonHelper.DeserializeObject<List<MailConfig_Extend>>(mailConfig);
...@@ -158,7 +163,7 @@ namespace REBORN.Common.EMail ...@@ -158,7 +163,7 @@ namespace REBORN.Common.EMail
/// </summary> /// </summary>
/// <param name="dic"></param> /// <param name="dic"></param>
/// <returns></returns> /// <returns></returns>
public string CreateMessage(Dictionary<string, string> dic) public string CreateMessage(Dictionary<string, string> dic,string title= "订单信息")
{ {
// 创建字典并填充数据 // 创建字典并填充数据
//Dictionary<string, string> dic = new Dictionary<string, string>(); //Dictionary<string, string> dic = new Dictionary<string, string>();
...@@ -177,7 +182,7 @@ namespace REBORN.Common.EMail ...@@ -177,7 +182,7 @@ namespace REBORN.Common.EMail
<head> <head>
<meta charset=""UTF-8""> <meta charset=""UTF-8"">
<meta name=""viewport"" content=""width=device-width, initial-scale=1.0""> <meta name=""viewport"" content=""width=device-width, initial-scale=1.0"">
<title>订单信息</title> <title>{title}</title>
<style> <style>
* {{ * {{
margin: 0; margin: 0;
......
...@@ -126,6 +126,65 @@ namespace REBORN.Common.Plugin ...@@ -126,6 +126,65 @@ namespace REBORN.Common.Plugin
} }
} }
/// <summary>
/// 尾款提醒推送
/// </summary>
/// <param name="dic"></param>
/// <param name="url"></param>
public static void BalancePaymentMessagePush(Dictionary<string, string> dic, string url)
{
//订单信息推送到“四川和平国际旅行社”大群
// url = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=49804140-6b46-4e30-8d6b-ea474f92daf7";
//微途测试机器人
//url = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=d9b998ee-2c87-4689-a57d-c087cee16fd7";
var postdata = new
{
msgtype = "text",
text = new
{
content = "订单尾款提醒!",
mentioned_list = new List<string>() { "@all" },
}
};
if (Config.IsOnline)
{
Common.Plugin.HttpHelper.HttpPost(url, Common.Plugin.JsonHelper.Serialize(postdata), "");
}
else
{
Common.Plugin.LogHelper.RequestInfo(string.Format("OrderMessagePush_url::{0} params::{1} ", url, Common.Plugin.JsonHelper.Serialize(postdata)));
}
string content = $"订单信息!";
if (dic != null && dic.Count > 0)
{
foreach (var item in dic)
{
if (!string.IsNullOrWhiteSpace(item.Value))
{
content += $"\n> {item.Key}:<font color=\"comment\">{item.Value.Replace("\"", "").Replace("\n", "").Replace("\t", "").Replace("\r", "").Replace("\f", "").Replace("\v", "")}</font>";
}
}
}
//内容推送
var postdata2 = new
{
msgtype = "markdown",
markdown = new
{
content = content
}
};
if (Config.IsOnline)
{
Common.Plugin.HttpHelper.HttpPost(url, Common.Plugin.JsonHelper.Serialize(postdata2), "");//内容推送
}
else
{
Common.Plugin.LogHelper.RequestInfo(string.Format("OrderMessagePush_url::{0} params::{1} ", url, Common.Plugin.JsonHelper.Serialize(postdata2)));
}
}
/// <summary> /// <summary>
/// 机票价格变动提醒 /// 机票价格变动提醒
/// </summary> /// </summary>
......
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<appSettings>
<add key="VoiceIndexPath" value="SearchIndex\\Voice" />
<!--营收报表每个月哪天跑数据-->
<add key="RevenueReportUpdateBy" value="1" />
<add key="RevenueReport" value="28" />
<add key="Jalan_RequstUrl" value="https://www.jalan.net/ui/api/GAS/HotelList.do" />
<add key="Jalan_Cid" value="E101" />
<add key="Jalan_ApiKey" value="wFry64Rn1sI8QOf6dMB5rZzpk5ALowGipD2RWa+W4mc=" />
<add key="Jalan_RepId" value="T1E1011000" />
<!--Mongo配置-->
<add key="Mongo" value="mongodb://admin:Viitto2018@172.16.48.131:27017/?authSource=admin" />
<!--Mongo数据库名称-->
<add key="MongoDBName" value="DMC" />
<!--IM 配置-->
<add key="ImKey" value="b612b31e837c79c68f141aeb719d2b20" />
<add key="ImSecret" value="66000451fb72" />
<!--Redis配置-->
<add key="RedisServer" value="172.16.48.131" />
<add key="RedisPort" value="6379" />
<add key="RedisPwd" value="Viitto2018" />
<add key="IsOnline" value="true" />
<!--画途邮箱基础信息开始-->
<add key="MailConfig" value='[{"MailFromAccount":"service@viitto.com","MailPassword":"bSL7FkkFCBsU3omk","Title":"Travel Design产品团队","RB_Group_id":"2"}]'/>
<!--画途邮箱基础信息结束-->
</appSettings>
<connectionStrings>
<add name="DefaultConnection" providerName="MySql.Data.MySqlClient" connectionString="server=192.168.5.214;port=3306;user id=reborn;password=Reborn@2018;database=reborn_user;CharSet=utf8; Convert Zero Datetime=true; " />
<!--allow zero datetime=true;Convert Zero Datetime=true;-->
<add name="DMCConnection" providerName="MySql.Data.MySqlClient" connectionString="server=192.168.5.214;port=3306;user id=reborn;password=Reborn@2018;database=reborn_dmc;CharSet=utf8; Convert Zero Datetime=true;" />
<!--日志数据库-->
<add name="LogConnection" providerName="MySql.Data.MySqlClient" connectionString="server=192.168.5.214;port=3306;user id=reborn;password=Reborn@2018;database=reborn_log;CharSet=utf8; Convert Zero Datetime=true;" />
<!--财务数据库-->
<add name="FinanceConnection" providerName="MySql.Data.MySqlClient" connectionString="server=192.168.5.214;port=3306;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8; Convert Zero Datetime=true;" />
<!--销售数据库-->
<add name="SellConnection" providerName="MySql.Data.MySqlClient" connectionString="server=192.168.5.214;port=3306;user id=reborn;password=Reborn@2018;database=reborn_sell;CharSet=utf8; Convert Zero Datetime=true;" />
<!--统计数据库-->
<add name="DataStatisticsConnection" providerName="MySql.Data.MySqlClient" connectionString="server=192.168.5.214;port=3306;user id=reborn;password=Reborn@2018;database=reborn_datastatistics;CharSet=utf8; Convert Zero Datetime=true;" />
<!--爬虫数据库-->
<add name="SpiderConnection" providerName="MySql.Data.MySqlClient" connectionString="server=192.168.5.214;port=3306;user id=reborn;password=Reborn@2018;database=spider;CharSet=utf8; Convert Zero Datetime=true;" />
<!--视频数据库-->
<add name="VideoConnection" providerName="MySql.Data.MySqlClient" connectionString="server=192.168.5.214;port=3306;user id=reborn;password=Reborn@2018;database=reborn_video;CharSet=utf8; Convert Zero Datetime=true;" />
<!--<add name="DefaultConnection" providerName="MySql.Data.MySqlClient" connectionString="server=rm-bp1tj77h6kp0d02fb.mysql.rds.aliyuncs.com;port=3306;user id=reborn;password=Reborn@2018;database=uat_reborn_user;CharSet=utf8;Convert Zero Datetime=true;" />
--><!--allow zero datetime=true;Convert Zero Datetime=true;--><!--
<add name="DMCConnection" providerName="MySql.Data.MySqlClient" connectionString="server=rm-bp1tj77h6kp0d02fb.mysql.rds.aliyuncs.com;port=3306;user id=reborn;password=Reborn@2018;database=uat_reborn_dmc;CharSet=utf8;Convert Zero Datetime=true;" />
--><!--日志数据库--><!--
<add name="LogConnection" providerName="MySql.Data.MySqlClient" connectionString="server=rm-bp1tj77h6kp0d02fb.mysql.rds.aliyuncs.com;port=3306;user id=reborn;password=Reborn@2018;database=uat_reborn_log;CharSet=utf8;Convert Zero Datetime=true;" />
--><!--销售数据库--><!--
<add name="SellConnection" providerName="MySql.Data.MySqlClient" connectionString="server=rm-bp1tj77h6kp0d02fb.mysql.rds.aliyuncs.com;port=3306;user id=reborn;password=Reborn@2018;database=uat_reborn_sell;CharSet=utf8;Convert Zero Datetime=true;" />
--><!--财务数据库--><!--
<add name="FinanceConnection" providerName="MySql.Data.MySqlClient" connectionString="server=rm-bp1tj77h6kp0d02fb.mysql.rds.aliyuncs.com;port=3306;user id=reborn;password=Reborn@2018;database=uat_reborn_finance;CharSet=utf8;Convert Zero Datetime=true;" />
--><!--国内票务--><!--
<add name="DomesticConnection" providerName="MySql.Data.MySqlClient" connectionString="server=rm-bp1tj77h6kp0d02fb.mysql.rds.aliyuncs.com;port=3306;user id=reborn;password=Reborn@2018;database=uat_reborn_domestic_ticket;CharSet=utf8;Convert Zero Datetime=true;" />
--><!--统计数据库-->
<!--<add name="DataStatisticsConnection" providerName="MySql.Data.MySqlClient" connectionString="server=rm-bp1tj77h6kp0d02fb.mysql.rds.aliyuncs.com;port=3306;user id=reborn;password=Reborn@2018;database=uat_reborn_datastatistics;CharSet=utf8; Convert Zero Datetime=true;" />-->
</connectionStrings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-0.86.0.518" newVersion="0.86.0.518" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.9.12.0" newVersion="6.9.12.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="0e99375e54769942" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.9.0.0" newVersion="1.9.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.12.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data></configuration>
\ No newline at end of file
using Quartz;
using Quartz.Impl;
using REBORN.Common;
using REBORN.Common.EMail;
using REBORN.Common.Enum.Dmc;
using REBORN.Common.Plugin;
using REBORN.Model.Entity;
using REBORN.Model.Extend;
using REBORN.Model.Extend.Dmc;
using REBORN.Model.Extend.Sell;
using REBORN.Repository.Commons;
using REBORN.Repository.Dmc;
using REBORN.Repository.Sell;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace REBORN.HuaTuQUART
{
public class Program
{
static void Main(string[] args)
{
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new RebornTimerServer(),
};
ServiceBase.Run(ServicesToRun);
// QuarzHelper quarzHelper = new QuarzHelper();
// quarzHelper.StartAsync();
// quarzHelper.StartSellTaskStatistics();
// quarzHelper.StartUpdateAnnualLeaves();
// quarzHelper.StartUpdateRevenueReport().GetAwaiter();
// quarzHelper.StartAsync();
// Console.ReadKey();
//注: 发布时 app.confing需要配置成正式数据库连接地址
}
}
public class QuarzHelper
{
public async Task StartAsync()
{
//更新币种汇率 2019-05-07 修改为每天凌晨定时更新
string cronExpression = "0 30 0 * * ?";
NameValueCollection props = new NameValueCollection
{
{ "quartz.serializer.type", "binary" }
};
StdSchedulerFactory factory = new StdSchedulerFactory(props);
IScheduler scheduler = await factory.GetScheduler();
await scheduler.Start();
IJobDetail job = JobBuilder.Create<SellTask>()
.WithIdentity("job1", "group1")
.Build();
//ITrigger trigger = TriggerBuilder.Create()
// .WithIdentity("trigger1", "group1")
// .StartNow()
// .WithSimpleSchedule(x => x
// .WithIntervalInMinutes(10)
// .RepeatForever())
// .Build();
ICronTrigger trigger = (ICronTrigger)TriggerBuilder.Create()
.WithIdentity("trigger1", "group1")
.WithCronSchedule(cronExpression)
.Build();
await scheduler.ScheduleJob(job, trigger);
}
}
public class SellTask : IJob
{
/// <summary>
/// 团订单仓储层对象
/// </summary>
private static RB_Travel_OrderRepository orderRepository = new RB_Travel_OrderRepository();
private static RB_Sell_VisaOrderRepository sellVisaOrderRepository = new RB_Sell_VisaOrderRepository();
private static RB_Customer_HotelOrderRepository customer_HotelOrderRepository = new RB_Customer_HotelOrderRepository();
private static RB_Customer_TicketOrderRepository customerTicketOrderRepository = new RB_Customer_TicketOrderRepository();
private static RB_CRMTicket_OrderRepository cRMTicket_OrderRepository = new RB_CRMTicket_OrderRepository();
private readonly RB_MessagePushConfigRepository repository = new RB_MessagePushConfigRepository();
private readonly RB_EmployeeRepository employeeRepository = new RB_EmployeeRepository();
/// <summary>
/// 这里是作业调度每次定时执行方法
/// </summary>
/// <param name="context"></param>
public Task Execute(IJobExecutionContext context)
{
var mpcList = repository.GetList(new RB_MessagePushConfig());//消息推送配置
#region 订单信息
StringBuilder builder = new StringBuilder();
//跟团游订单
builder.AppendFormat(@"SELECT A.RB_Group_id,A.OrderSource,A.OrderId,A.GuestNum,A.EnterID,b.StartDate,B.PriceTeamType,c.Title,A.FinalPriceTips from rb_travel_order AS A INNER JOIN rb_travel_price AS B ON A.TCID=B.TCID
LEFT JOIN rb_travel_config as c on c.ID=b.ConfigID
where FinalPriceTips>0 and b.StartDate>NOW()");
var orderList = orderRepository.Get<RB_Travel_Order_Extend>(builder.ToString()).ToList();
//签证订单
StringBuilder builderVisaOrder = new StringBuilder();
builderVisaOrder.AppendFormat(@"SELECT A.RB_Group_id,A.Id,a.PeopleNum,a.CreateBy,b.`Name`,a.SignOutTime,A.FinalPriceTips from rb_sell_visaorder as a LEFT JOIN RB_Sell_VisaProduct as b on a.VisaId=b.Id where FinalPriceTips>0 and a.SignOutTime>NOW()");
var visaOrderList = sellVisaOrderRepository.Get<RB_Sell_VisaOrder_Extend>(builderVisaOrder.ToString()).ToList();
//酒店
StringBuilder builderHotelOrder = new StringBuilder();
builderHotelOrder.AppendFormat(@"SELECT A.RB_Group_id,a.OrderNo,A.EnterID,c.`Name` as HotelName,a.CheckIn,A.FinalPriceTips from rb_customer_hotelorder as a LEFT JOIN rb_customer_hotelorderdetail as b on a.OrderId=b.OrderId INNER JOIN rb_hotel as c on c.ID=b.HotelId where FinalPriceTips>0 and a.CheckIn>NOW()");
var hotelOrderList = customer_HotelOrderRepository.Get<RB_Customer_HotelOrder_Extend>(builderHotelOrder.ToString()).ToList();
//邮轮订单
StringBuilder builderTicketOrder = new StringBuilder();
builderTicketOrder.AppendFormat(@"SELECT A.GroupId,A.OrderNo,a.EnterID,b.`Name` as CouponsName,a.UseDate,A.FinalPriceTips from rb_customer_ticketorder as a LEFT JOIN rb_ticketcoupons as b on a.CouponsId=b.ID where FinalPriceTips>0 and a.UseDate>NOW()");
var ticketOrderList = customerTicketOrderRepository.Get<RB_Customer_TicketOrder_Extend>(builderTicketOrder.ToString()).ToList();
//单机票订单
StringBuilder builderCRMTicketOrder = new StringBuilder();
builderCRMTicketOrder.AppendFormat(@"SELECT A.GroupId,A.GuestCount,A.DepartTime,A.EnterID,A.FinalPriceTips from reborn_sell.RB_Ticket_Order as A where FinalPriceTips>0 and a.DepartTime>NOW()");
var cRMTicket_OrderList = cRMTicket_OrderRepository.Get<RB_CRMTicket_Order_Extend>(builderCRMTicketOrder.ToString()).ToList();
#endregion
#region 员工信息
List<int> employeeList = new List<int>();
if (orderList != null && orderList.Any())
{
employeeList.AddRange(orderList.Where(x => x.EnterID > 0).Select(x => x.EnterID ?? 0));
}
if (visaOrderList != null && visaOrderList.Any())
{
employeeList.AddRange(visaOrderList.Where(x => x.CreateBy > 0).Select(x => x.CreateBy ?? 0));
}
if (hotelOrderList != null && hotelOrderList.Any())
{
employeeList.AddRange(hotelOrderList.Where(x => x.EnterID > 0).Select(x => x.EnterID));
}
if (ticketOrderList != null && ticketOrderList.Any())
{
employeeList.AddRange(ticketOrderList.Where(x => x.EnterID > 0).Select(x => x.EnterID));
}
if (cRMTicket_OrderList != null && cRMTicket_OrderList.Any())
{
employeeList.AddRange(cRMTicket_OrderList.Where(x => x.EnterID > 0).Select(x => x.EnterID));
}
List<RB_Employee_Extend> employeeNameList = new List<RB_Employee_Extend>();
if (employeeList != null && employeeList.Any())
{
employeeNameList = employeeRepository.GetEmpInfoListByIds(string.Join(",", employeeList.Select(x => x)));
}
#endregion
#region 推送尾款提醒消息
var nowDay = DateTime.Now;
if (orderList != null && orderList.Any())
{
foreach (var item in orderList)
{
if (item.FinalPriceTips > 0 && item.StartDate.HasValue && StringHelper.FormatDate(item.StartDate.Value.AddDays(item.FinalPriceTips - 1)) == StringHelper.FormatDate(nowDay))
{
//新增订单,推送消息
Dictionary<string, string> dic = new Dictionary<string, string>();
string teamTypeName = "";
if (item.PriceTeamType == (int)PriceTeamTypeEnum.SanPing)
{
teamTypeName = "定制团";
}
else if (item.PriceTeamType == (int)PriceTeamTypeEnum.OutTravel)
{
teamTypeName = "外交团";
}
if (!string.IsNullOrWhiteSpace(teamTypeName))
{
dic.Add("订单类型", teamTypeName);
}
string orderSourceStr = item?.OrderSource?.ToName();
if (!string.IsNullOrEmpty(orderSourceStr))
{
dic.Add("订单来源", orderSourceStr);
}
dic.Add("订单编号", item.OrderId.ToString());
dic.Add("产品名称", item?.Title ?? "");
dic.Add("订单人数", (item?.GuestNum ?? 0).ToString() + "人");
dic.Add("销售人员", employeeNameList?.FirstOrDefault(x => x.EmployeeId == item.EnterID)?.EmName ?? "");
//新增订单,推送消息
var nowmpcList = mpcList.Where(x => x.RB_Group_Id == (item.RB_Group_Id ?? 0))?.ToList() ?? new List<RB_MessagePushConfig>();
MessagePushSend(nowmpcList, item.RB_Group_Id ?? 0, dic, MessagePushSendType.PaymentReminder);
}
}
}
if (visaOrderList != null && visaOrderList.Any())
{
foreach (var item in visaOrderList)
{
if (item.FinalPriceTips > 0 && item.SignOutTime.HasValue && StringHelper.FormatDate(item.SignOutTime.Value.AddDays(item.FinalPriceTips - 1)) == StringHelper.FormatDate(nowDay))
{
//新增订单,推送消息
Dictionary<string, string> dic = new Dictionary<string, string>();
dic.Add("订单类型", "签证产品");
dic.Add("订单编号", item.Id.ToString());
dic.Add("产品名称", item?.Name ?? "");
dic.Add("订单人数", (item.PeopleNum).ToString() + "人");
dic.Add("销售人员", employeeNameList?.FirstOrDefault(x => x.EmployeeId == (item.CreateBy ?? 0))?.EmName ?? "");
//新增订单,推送消息
var nowmpcList = mpcList.Where(x => x.RB_Group_Id == (item.RB_Group_Id ?? 0))?.ToList() ?? new List<RB_MessagePushConfig>();
MessagePushSend(nowmpcList, item.RB_Group_Id ?? 0, dic, MessagePushSendType.PaymentReminder);
}
}
}
if (hotelOrderList != null && hotelOrderList.Any())
{
foreach (var item in hotelOrderList)
{
if (item.FinalPriceTips > 0 && item.CheckIn.HasValue && StringHelper.FormatDate(item.CheckIn.Value.AddDays(item.FinalPriceTips - 1)) == StringHelper.FormatDate(nowDay))
{
//新增订单,推送消息
Dictionary<string, string> dic = new Dictionary<string, string>
{
{ "订单类型", "酒店产品" },
{ "订单编号", item.OrderNo.ToString() },
{ "产品名称", item.HotelName },
{ "销售人员",employeeNameList?.FirstOrDefault(x => x.EmployeeId == item.EnterID )?.EmName ?? "" }
};
//新增订单,推送消息
var nowmpcList = mpcList.Where(x => x.RB_Group_Id == item.GroupId)?.ToList() ?? new List<RB_MessagePushConfig>();
MessagePushSend(nowmpcList, item.GroupId, dic, MessagePushSendType.PaymentReminder);
}
}
}
if (ticketOrderList != null && ticketOrderList.Any())
{
foreach (var item in ticketOrderList)
{
if (item.FinalPriceTips > 0 && item.UseDate.HasValue && StringHelper.FormatDate(item.UseDate.Value.AddDays(item.FinalPriceTips - 1)) == StringHelper.FormatDate(nowDay))
{
Dictionary<string, string> dic = new Dictionary<string, string>
{
{ "订单类型", "邮轮产品" },
{ "订单编号", item.OrderNo.ToString() },
{ "产品名称", item.CouponsName },
{ "销售人员", employeeNameList?.FirstOrDefault(x => x.EmployeeId == item.EnterID )?.EmName ?? "" }
};
//新增订单,推送消息
var nowmpcList = mpcList.Where(x => x.RB_Group_Id == item.GroupId)?.ToList() ?? new List<RB_MessagePushConfig>();
MessagePushSend(nowmpcList, item.GroupId, dic, MessagePushSendType.PaymentReminder);
}
}
}
if (cRMTicket_OrderList != null && cRMTicket_OrderList.Any())
{
foreach (var item in cRMTicket_OrderList)
{
if (item.FinalPriceTips > 0 && item.DepartTime.HasValue && StringHelper.FormatDate(item.DepartTime.Value.AddDays(item.FinalPriceTips - 1)) == StringHelper.FormatDate(nowDay))
{
Dictionary<string, string> dic = new Dictionary<string, string>
{
{ "订单类型", "单机票产品" },
{ "出行人数", item.GuestCount.ToString() },
{ "出发时间", StringHelper.FormatDate(item.DepartTime) },
{ "销售人员", employeeNameList?.FirstOrDefault(x => x.EmployeeId == item.EnterID )?.EmName ?? "" }
};
//新增订单,推送消息
var nowmpcList = mpcList.Where(x => x.RB_Group_Id == item.GroupId)?.ToList() ?? new List<RB_MessagePushConfig>();
MessagePushSend(nowmpcList, item.GroupId, dic, MessagePushSendType.PaymentReminder);
}
}
}
#endregion
Console.WriteLine("执行了没有?");
return null;
}
/// <summary>
/// 消息推送信息
/// </summary>
/// <param name="RB_Group_id"></param>
/// <param name="dic"></param>
/// <param name="mSendType"></param>
public void MessagePushSend(List<RB_MessagePushConfig> mpcList, int RB_Group_id, Dictionary<string, string> dic, MessagePushSendType mSendType)
{
if (mpcList != null && mpcList.Any())
{
foreach (var mpcModel in mpcList)
{
int sendType = (int)mSendType;
var sendTypeList = StringHelper.StringToListInt(mpcModel?.SendType ?? "");
if (!string.IsNullOrWhiteSpace(mpcModel?.WeChatBotWebhookUrl ?? "") && sendTypeList != null && (sendTypeList.Any(x => x == sendType)) && (mpcModel?.WeChatBotEnabled ?? 0) == 1)
{//新增订单,推送消息
try
{
Common.Plugin.QYWorkHelper.BalancePaymentMessagePush(dic, mpcModel?.WeChatBotWebhookUrl);
}
catch (Exception ex)
{
LogHelper.Error("企业微信消息推送失败", ex);
}
}
if (!string.IsNullOrWhiteSpace(mpcModel?.EmailRecipients ?? "") && sendTypeList != null && (sendTypeList.Any(x => x == sendType)) && (mpcModel?.EmailEnabled ?? 0) == 1)
{//新增订单,推送消息
try
{
List<string> emailRecipientsList = new List<string>();
if (!string.IsNullOrWhiteSpace(mpcModel.EmailRecipients))
{
try
{
var revices = new Dictionary<string, string>();
emailRecipientsList = mpcModel.EmailRecipients.Split(',').ToList();
foreach (var item in emailRecipientsList)
{
if (!string.IsNullOrWhiteSpace(item))
{
revices.Add(item.Replace(" ", "").Split('@')?[0] + "", item.Replace(" ", ""));
}
}
EMailHelper.Instance.SendEmail(revices, "订单尾款提醒", (EMailHelper.Instance.CreateMessage(dic, "订单尾款提醒")), RB_Group_id.ToString());
}
catch (Exception ex)
{
}
}
}
catch (Exception ex)
{
LogHelper.Error("邮件消息推送失败", ex);
}
}
}
}
}
}
}
namespace REBORN.HuaTuQUART
{
partial class ProjectInstaller
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller();
this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller();
//
// serviceProcessInstaller1
//
this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem;
this.serviceProcessInstaller1.Password = null;
this.serviceProcessInstaller1.Username = null;
//
// serviceInstaller1
//
this.serviceInstaller1.Description = "RebornTimerService定时器服务";
this.serviceInstaller1.ServiceName = "RebornTimerServer";
this.serviceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
//
// ProjectInstaller
//
this.Installers.AddRange(new System.Configuration.Install.Installer[] {
this.serviceProcessInstaller1,
this.serviceInstaller1});
}
#endregion
private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1;
private System.ServiceProcess.ServiceInstaller serviceInstaller1;
}
}
\ No newline at end of file
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;
using System.Threading.Tasks;
namespace REBORN.HuaTuQUART
{
[RunInstaller(true)]
public partial class ProjectInstaller : Installer
{
public ProjectInstaller()
{
InitializeComponent();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="serviceProcessInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="serviceInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>208, 17</value>
</metadata>
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>
\ No newline at end of file
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("REBORN.HuaTuQUART")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("REBORN.HuaTuQUART")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("ff7660d5-90ca-4239-9e8b-5a23f34dbaf1")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{FF7660D5-90CA-4239-9E8B-5A23F34DBAF1}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>REBORN.HuaTuQUART</RootNamespace>
<AssemblyName>REBORN.HuaTuQUART</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="MySql.Data, Version=6.9.12.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.6.9.12\lib\net45\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="Quartz, Version=3.0.6.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
<HintPath>..\packages\Quartz.3.0.6\lib\net452\Quartz.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="ProjectInstaller.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ProjectInstaller.Designer.cs">
<DependentUpon>ProjectInstaller.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RebornTimerServer.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="RebornTimerServer.Designer.cs">
<DependentUpon>RebornTimerServer.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ProjectInstaller.resx">
<DependentUpon>ProjectInstaller.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\REBORN.Common\REBORN.Common.csproj">
<Project>{96E43A43-C8B3-4F34-AD86-CB315605231C}</Project>
<Name>REBORN.Common</Name>
</ProjectReference>
<ProjectReference Include="..\REBORN.Model\REBORN.Model.csproj">
<Project>{C0C71A88-A513-4DB5-BC0E-72F08FFD790F}</Project>
<Name>REBORN.Model</Name>
</ProjectReference>
<ProjectReference Include="..\REBORN.Repository\REBORN.Repository.csproj">
<Project>{DE668CE6-7AD2-4960-96DE-2C2653723180}</Project>
<Name>REBORN.Repository</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
namespace REBORN.HuaTuQUART
{
partial class RebornTimerServer
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.ServiceName = "RebornTimerServer";
}
#endregion
}
}

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading.Tasks;
namespace REBORN.HuaTuQUART
{
partial class RebornTimerServer : ServiceBase
{
public RebornTimerServer()
{
InitializeComponent();
}
/// <summary>
/// 在此处添加代码以启动服务。
/// </summary>
/// <param name="args"></param>
protected override void OnStart(string[] args)
{
QuarzHelper quarzHelper = new QuarzHelper();
quarzHelper.StartAsync().GetAwaiter().GetResult();
}
/// <summary>
/// 在此处添加代码以执行停止服务所需的关闭操作。
/// </summary>
protected override void OnStop()
{
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MySql.Data" version="6.9.12" targetFramework="net461" />
<package id="Quartz" version="3.0.6" targetFramework="net461" />
</packages>
\ No newline at end of file
...@@ -174,14 +174,18 @@ namespace REBORN.Module.ConfigModule ...@@ -174,14 +174,18 @@ namespace REBORN.Module.ConfigModule
emailRecipientsList = mpcModel.EmailRecipients.Split(',').ToList(); emailRecipientsList = mpcModel.EmailRecipients.Split(',').ToList();
foreach (var item in emailRecipientsList) foreach (var item in emailRecipientsList)
{ {
revices.Add(item.Split('@')?[0], item); if (!string.IsNullOrWhiteSpace(item))
{
revices.Add(item.Replace(" ", "").Split('@')?[0] + "", item.Replace(" ", ""));
}
} }
EMailHelper.Instance.SendEmail(revices, "新订单推送", (EMailHelper.Instance.CreateMessage(dic)), RB_Group_id.ToString());
} }
catch (Exception ex) catch (Exception ex)
{ {
} }
} }
EMailHelper.Instance.SendEmail(revices, "新订单推送", (EMailHelper.Instance.CreateMessage(dic)), RB_Group_id.ToString());
} }
catch (Exception ex) catch (Exception ex)
{ {
......
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