Browse Source

添加配置

Lishi
xxe 2 years ago
parent
commit
1785f7daed
4 changed files with 44 additions and 9 deletions
  1. +4
    -0
      HKCardOUT/Bootstrapper.cs
  2. +3
    -0
      HKCardOUT/HKCardOUT.csproj
  3. +10
    -9
      HKCardOUT/options.json
  4. +27
    -0
      HKCardOUT/options.pro.json

+ 4
- 0
HKCardOUT/Bootstrapper.cs View File

@@ -59,7 +59,11 @@ namespace HKCardOUT
/// </summary>
protected override void Configure()
{
#if DEBUG
var configer = (new ConfigurationBuilder()).AddJsonFile("options.json").Build();
#else
var configer = (new ConfigurationBuilder()).AddJsonFile("options.pro.json").Build();
#endif
DataBus.ConnectionString = configer.GetConnectionString("Sqlite");
HKLib.Configer.MqAddress = configer["MQ"];
DataBus.Cron = configer["Cron"];


+ 3
- 0
HKCardOUT/HKCardOUT.csproj View File

@@ -47,6 +47,9 @@
<Resource Include="HKResouces\背景.jpg" />
</ItemGroup>
<ItemGroup>
<None Update="options.pro.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="options.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>


+ 10
- 9
HKCardOUT/options.json View File

@@ -1,26 +1,27 @@
{
//此配置文件为测试环境
//服务地址
"SaasRoute": "https://bpa.black-pa.com:21527/kitchen/",
"SaasRoute": "https://bpa.black-pa.com:21528/kitchen/",
//启动设备调试
"StartDevice": true,
"StartDevice": false,
//串口
"COM": "COM3",
"COM": "COM8",
//定时任务时间表达式 每隔6小时推送一次
"Cron": "0 0 0/6 * * ?",
"Cron": "0/5 * * * * ?",
//店铺ID
"StoreId": "a19535e8-119f-4b10-a011-6288fd3ddb37",
"StoreId": "6341f7d5-2d62-4a7d-8386-3467741efcef",
//加盟商Id
"TenantId": "68d4de9c-a277-4d7a-a192-e9fa91327d41",
"TenantId": "78d635f7-8ee4-4be4-b26a-462016196826",
//本地数据库
"ConnectionStrings": {
"Sqlite": "HKSQL.db3"
},
//每个时间段的刷卡次数
"Count": 1,
"Count": 999,
//取消单卡刷卡限制
"Cancel": false,
//MQ测试地址
"MQ": "host=10.2.1.21:5672;username=guest;password=guest"
//"MQ": "host=10.2.1.21:5672;username=guest;password=guest"
//MQ正式地址
//"MQ": "host=47.108.65.220;username=root;password=pwd"
"MQ": "host=47.108.65.220;username=root;password=pwd"
}

+ 27
- 0
HKCardOUT/options.pro.json View File

@@ -0,0 +1,27 @@
{
//此配置文件为正式环境
//服务地址
"SaasRoute": "https://witt.black-pa.com/kitchen/",
//启动设备调试
"StartDevice": true,
//串口
"COM": "COM8",
//定时任务时间表达式 每隔6小时推送一次
"Cron": "0 0 0/6 * * ?",
//店铺ID
"StoreId": "0c32b2e2-0dc9-4941-b73d-3dc91f7268ab",
//加盟商Id
"TenantId": "01911b43-8844-4d93-b916-34208e31ba66",
//本地数据库
"ConnectionStrings": {
"Sqlite": "HKSQL.db3"
},
//每个时间段的刷卡次数
"Count": 1,
//取消单卡刷卡限制
"Cancel": true,
//MQ测试地址
//"MQ": "host=10.2.1.21:5672;username=guest;password=guest"
//MQ正式地址
"MQ": "host=47.108.65.220;username=root;password=pwd"
}

Loading…
Cancel
Save