Browse Source

刷卡端

Lishi
xxe 2 years ago
parent
commit
e06328582c
3 changed files with 14 additions and 1 deletions
  1. +11
    -0
      HKCardOUT/Bootstrapper.cs
  2. +2
    -0
      HKCardOUT/Helper/DataBus.cs
  3. +1
    -1
      HKCardOUT/options.json

+ 11
- 0
HKCardOUT/Bootstrapper.cs View File

@@ -6,6 +6,8 @@ using System.Windows.Threading;
using System.Windows; using System.Windows;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using HKCardOUT.Helper; using HKCardOUT.Helper;
using HKCardOUT.QuartzUtil.Job;
using HKCardOUT.QuartzUtil;


namespace HKCardOUT namespace HKCardOUT
{ {
@@ -30,6 +32,8 @@ namespace HKCardOUT
{ {
var configer = (new ConfigurationBuilder()).AddJsonFile("options.json").Build(); var configer = (new ConfigurationBuilder()).AddJsonFile("options.json").Build();
DataBus.ConnectionString = configer.GetConnectionString("Sqlite"); DataBus.ConnectionString = configer.GetConnectionString("Sqlite");
DataBus.Cron = configer["Cron"];
DataBus.SaasRoute = configer["SaasRoute"];
base.Configure(); base.Configure();
} }


@@ -55,6 +59,13 @@ namespace HKCardOUT
/// </summary> /// </summary>
protected override void OnLaunch() protected override void OnLaunch()
{ {
QuartzCoreFactory.QuartzCore().AddJob<QuartzJob>(new QuartzMap
{
JobDetail = "定时推送订单",
Cron = DataBus.Cron,
JobName = "订单",
JobGroup = "订单"
});
base.OnLaunch(); base.OnLaunch();
} }




+ 2
- 0
HKCardOUT/Helper/DataBus.cs View File

@@ -20,5 +20,7 @@ namespace HKCardOUT.Helper
_ConnectionString = SyncStatic.CreateFile(Path.Combine(SyncStatic.CreateDir(Route), value)); _ConnectionString = SyncStatic.CreateFile(Path.Combine(SyncStatic.CreateDir(Route), value));
} }
} }
public static string Cron { get; set; }
public static string SaasRoute { get; set; }
} }
} }

+ 1
- 1
HKCardOUT/options.json View File

@@ -1,6 +1,6 @@
{ {
"SaasRoute": "", "SaasRoute": "",
"Cron": "",
"Cron": "0 0 11,15 * * ? ",
"ConnectionStrings": { "ConnectionStrings": {
"Sqlite": "HKSQL.db3" "Sqlite": "HKSQL.db3"
} }


Loading…
Cancel
Save