From 5fd6388237000661402365c3b6e3143c783d59dc Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Mon, 23 Sep 2019 10:23:43 +0800
Subject: [PATCH] rc2
Former-commit-id: 511b9af256b0b4363dc93e62ac64d9ec34c8ddd3
---
.../Infrastructure/Views/Shared/_Layout.cshtml | 2 +-
projects/Infrastructure/Web/DeviceAttribute.cs | 2 +-
projects/IoT/IdGen/Program.cs | 1 +
projects/IoT/IoTNode/appsettings.json | 2 +-
projects/IoTCenter/appsettings.json | 2 +-
.../Areas/Admin/Views/Shared/_Menu.cshtml | 17 +++--------------
projects/UserCenter/appsettings.json | 2 +-
publish/build.cmd | 6 +++---
8 files changed, 12 insertions(+), 22 deletions(-)
diff --git a/projects/Infrastructure/Views/Shared/_Layout.cshtml b/projects/Infrastructure/Views/Shared/_Layout.cshtml
index aa22eb0d..2cab332f 100644
--- a/projects/Infrastructure/Views/Shared/_Layout.cshtml
+++ b/projects/Infrastructure/Views/Shared/_Layout.cshtml
@@ -82,7 +82,7 @@
@Html.Raw(cfg["copyright"].Replace("{now}", DateTime.Now.Year.ToString()))
-
版本:@Html.Raw(cfg["version"]) 设备Id:@DeviceAttribute.DeviceId
+
版本:@Html.Raw(cfg["version"])
@if (User.Identity.IsAuthenticated)
{
管理
diff --git a/projects/Infrastructure/Web/DeviceAttribute.cs b/projects/Infrastructure/Web/DeviceAttribute.cs
index 4345197d..3943701c 100644
--- a/projects/Infrastructure/Web/DeviceAttribute.cs
+++ b/projects/Infrastructure/Web/DeviceAttribute.cs
@@ -13,7 +13,7 @@ namespace Infrastructure.Web
static DeviceAttribute()
{
- DeviceId = Helper.Instance.GetCPUNumber();
+ DeviceId = $"{Helper.Instance.GetCPUNumber()}{Helper.Instance.GetMacAddress()}".Md5();
}
public override void OnResultExecuting(ResultExecutingContext context)
diff --git a/projects/IoT/IdGen/Program.cs b/projects/IoT/IdGen/Program.cs
index bb03036b..6a1a110a 100644
--- a/projects/IoT/IdGen/Program.cs
+++ b/projects/IoT/IdGen/Program.cs
@@ -8,6 +8,7 @@ namespace IdGen
private static void Main(string[] args)
{
Console.WriteLine("物联网设备程序授权码生成工具:");
+ Console.WriteLine($"当前设备编号:{(Helper.Instance.GetCPUNumber() + Helper.Instance.GetMacAddress()).Md5()}");
var message = "请输入以空格分隔的设备编号、有效天数,有效天数为0则不限制使用期限";
Console.WriteLine(message);
while (true)
diff --git a/projects/IoT/IoTNode/appsettings.json b/projects/IoT/IoTNode/appsettings.json
index 8120d525..a1bbc856 100644
--- a/projects/IoT/IoTNode/appsettings.json
+++ b/projects/IoT/IoTNode/appsettings.json
@@ -1,5 +1,5 @@
{
- "version": "1.0.0-rc.1",
+ "version": "1.0.0-rc.2",
"Logging": {
"LogLevel": {
"Default": "Warning",
diff --git a/projects/IoTCenter/appsettings.json b/projects/IoTCenter/appsettings.json
index a4d65b13..089a3e5b 100644
--- a/projects/IoTCenter/appsettings.json
+++ b/projects/IoTCenter/appsettings.json
@@ -1,5 +1,5 @@
{
- "version": "1.0.0-rc.1",
+ "version": "1.0.0-rc.2",
"Logging": {
"LogLevel": {
"Default": "Warning",
diff --git a/projects/UserCenter/Areas/Admin/Views/Shared/_Menu.cshtml b/projects/UserCenter/Areas/Admin/Views/Shared/_Menu.cshtml
index afcd2667..61bbc59c 100644
--- a/projects/UserCenter/Areas/Admin/Views/Shared/_Menu.cshtml
+++ b/projects/UserCenter/Areas/Admin/Views/Shared/_Menu.cshtml
@@ -2,20 +2,9 @@
diff --git a/projects/UserCenter/appsettings.json b/projects/UserCenter/appsettings.json
index 4edd5d1f..e907e59f 100644
--- a/projects/UserCenter/appsettings.json
+++ b/projects/UserCenter/appsettings.json
@@ -1,5 +1,5 @@
{
- "version": "1.0.0-rc.1",
+ "version": "1.0.0-rc.2",
"Logging": {
"LogLevel": {
"Default": "Warning"
diff --git a/publish/build.cmd b/publish/build.cmd
index 7fd7b892..b8d41af0 100644
--- a/publish/build.cmd
+++ b/publish/build.cmd
@@ -5,10 +5,10 @@ rd /q/s "./dist/"
echo d|xcopy "./src" "./dist/" /s /e /y /f
-dotnet publish ../projects/UserCenter/UserCenter.csproj -c Release -r linux-x64 -o ../publish/dist/linux-x64/publish/apps/UserCenter
-dotnet publish ../projects/IoTCenter/IoTCenter.csproj -c Release -r linux-x64 -o ../publish/dist/linux-x64/publish/apps/IoTCenter
+dotnet publish ../projects/UserCenter/UserCenter.csproj -c Release -r linux-x64 -o ../../publish/dist/linux-x64/publish/apps/UserCenter
+dotnet publish ../projects/IoTCenter/IoTCenter.csproj -c Release -r linux-x64 -o ../../publish/dist/linux-x64/publish/apps/IoTCenter
-dotnet publish ../projects/IoT/IoTNode/IoTNode.csproj -c Release -o ../publish/dist/linux-arm64/publish/apps/IoTNode
+dotnet publish ../projects/IoT/IoTNode/IoTNode.csproj -c Release -o ../../../publish/dist/linux-arm64/publish/apps/IoTNode
::dotnet publish ../projects/IoT/IoTServices/WinService/WinService.csproj -c Release -r win-x86 -o "../../publish/dist/win-x86/Program Files (x86)/WinService"
::dotnet publish ../projects/IoT/IoTServices/APService/APService.csproj -c Release -o ../../publish/dist/linux-arm64/publish/apps/APService
::dotnet publish ../projects/IoT/IoTServices/FBeeService/FBeeService.csproj -c Release -r linux-arm64 -o ../publish/dist/linux-arm64/publish/apps/FBeeService