Former-commit-id: f954a3dccbf5db6646f6b8b9fd4ba1777cf70ba6
TangShanKaiPing
wanggang 6 years ago
parent 1c44a0ecde
commit 0e7ca59b81

@ -0,0 +1,16 @@
*.bak
*.suo
*.db
*.user
.vs
obj
Obj
bin
Bin
debug
Debug
release
Release
Logs
logs
node_modules

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Infrastructure\Infrastructure.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,28 @@
using Infrastructure.Extensions;
using System;
namespace IdGen
{
internal class Program
{
private static void Main(string[] args)
{
if (args.Length > 0)
{
Console.WriteLine(args[0].Md5().Base64UrlEncode().Md5());
}
while (true)
{
var input = Console.ReadLine();
if (input == "q")
{
break;
}
else
{
Console.WriteLine(input.Md5().Base64UrlEncode().Md5());
}
}
}
}
}

@ -32,7 +32,7 @@ namespace IoTNode
public Startup(IConfiguration configuration, IHostingEnvironment env) : base(configuration, env)
{
if (configuration["id"].Md5().Md5() != Helper.Instance.GetCPUNumber().Md5().Md5())
if (configuration["id"] != Helper.Instance.GetCPUNumber().Md5().Base64UrlEncode().Md5())
{
throw new Exception("设备id无效");
}

@ -37,6 +37,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoT.UI.Shard", "IoT\IoT.UI.
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infrastructure", "Infrastructure", "{AF2F6203-A338-4B48-8FED-5D6385663665}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IdGen", "IoT\IdGen\IdGen.csproj", "{775041E3-9B61-4B22-ABED-EAB48F54C900}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -99,6 +101,10 @@ Global
{1F466C72-FD35-483E-A199-2C143CB813C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F466C72-FD35-483E-A199-2C143CB813C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1F466C72-FD35-483E-A199-2C143CB813C1}.Release|Any CPU.Build.0 = Release|Any CPU
{775041E3-9B61-4B22-ABED-EAB48F54C900}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{775041E3-9B61-4B22-ABED-EAB48F54C900}.Debug|Any CPU.Build.0 = Debug|Any CPU
{775041E3-9B61-4B22-ABED-EAB48F54C900}.Release|Any CPU.ActiveCfg = Release|Any CPU
{775041E3-9B61-4B22-ABED-EAB48F54C900}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -116,6 +122,7 @@ Global
{871CD7E8-19F4-48F9-8124-66F69398C694} = {2A80F0AD-9ADB-464C-BF31-06E505D1793B}
{BE6DEBC5-004F-4811-8BDC-67C74D9E8C2F} = {B39CEABB-9A42-4BA2-A167-665349113986}
{1F466C72-FD35-483E-A199-2C143CB813C1} = {B39CEABB-9A42-4BA2-A167-665349113986}
{775041E3-9B61-4B22-ABED-EAB48F54C900} = {B39CEABB-9A42-4BA2-A167-665349113986}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0B7095FB-5E70-4EF8-805A-CB4A91AE4B0A}

Loading…
Cancel
Save