|
|
@@ -14,6 +14,8 @@ using ImTools; |
|
|
|
using XExten.Advance.LinqFramework; |
|
|
|
using System.Threading; |
|
|
|
using HKLog; |
|
|
|
using HKLib.RabbitMQ.Config; |
|
|
|
using HKLib.RabbitMQ.Subscriber; |
|
|
|
|
|
|
|
namespace HKCardOUT |
|
|
|
{ |
|
|
@@ -44,7 +46,7 @@ namespace HKCardOUT |
|
|
|
} |
|
|
|
Thread.Sleep(3000); |
|
|
|
}), "循环状态监测线程", false); |
|
|
|
HKLog.HKLogImport.Init("HKCardOUT"); |
|
|
|
HKLogImport.Init("HKCardOUT"); |
|
|
|
} |
|
|
|
|
|
|
|
protected override void ConfigureIoC(IStyletIoCBuilder builder) |
|
|
@@ -59,6 +61,7 @@ namespace HKCardOUT |
|
|
|
{ |
|
|
|
var configer = (new ConfigurationBuilder()).AddJsonFile("options.json").Build(); |
|
|
|
DataBus.ConnectionString = configer.GetConnectionString("Sqlite"); |
|
|
|
HKLib.Configer.MqAddress = configer["MQ"]; |
|
|
|
DataBus.Cron = configer["Cron"]; |
|
|
|
DataBus.SaasRoute = configer["SaasRoute"]; |
|
|
|
DataBus.StoreId = configer["StoreId"]; |
|
|
@@ -67,11 +70,14 @@ namespace HKCardOUT |
|
|
|
DataBus.StartDevice = configer["StartDevice"].AsBool(); |
|
|
|
DataBus.Cancel = configer["Cancel"].AsBool(); |
|
|
|
DataBus.Count = configer["Count"].AsInt(); |
|
|
|
//初始化表 |
|
|
|
DbContext.InitTable(); |
|
|
|
ServiceQueryExcute.QueryExcute.ExtuteMQ<CardHandle, string>("CardStutasChanged", MQEnum.Push); |
|
|
|
ServiceQueryExcute.QueryExcute.ExtuteMQ<TimeHandle, string>("TimeChanged", MQEnum.Push); |
|
|
|
HKLib.Configer.SaasRoute = DataBus.SaasRoute; |
|
|
|
HKLib.Configer.MqAddress = configer["MQ"]; |
|
|
|
//服务器拉取数据 |
|
|
|
RemoteService.SyncTime(); |
|
|
|
RemoteService.GetCardStuatas(); |
|
|
|
DbContext.InitTable(); |
|
|
|
RemoteService.PullShopInfo(); |
|
|
|
base.Configure(); |
|
|
|
} |
|
|
|