From cde6f0321e12ceae8420b099758ce0b3401bff8c Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 4 Oct 2019 10:30:57 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(#I12XVH):=20=E4=BD=BF=E7=94=A8=20System?= =?UTF-8?q?.Text.Json=20=E5=8F=8D=E5=BA=8F=E5=88=97=E5=8C=96=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E6=B6=88=E6=81=AF=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #Comment comment #I12XVH 设置忽略大小写 PropertyNameCaseInsensitive = true #Issue link #I12XVH --- src/admin/Bootstrap.DataAccess/Helper/SMSHelper.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/admin/Bootstrap.DataAccess/Helper/SMSHelper.cs b/src/admin/Bootstrap.DataAccess/Helper/SMSHelper.cs index c9b4b723..c9d4279e 100644 --- a/src/admin/Bootstrap.DataAccess/Helper/SMSHelper.cs +++ b/src/admin/Bootstrap.DataAccess/Helper/SMSHelper.cs @@ -44,12 +44,7 @@ namespace Bootstrap.DataAccess var req = await client.GetAsync(url); var content = await req.Content.ReadAsStringAsync(); #if NETCOREAPP3_0 - // UNDONE: 此处反序列化失败原因不明 - // var result = JsonSerializer.Deserialize(content); - var result = new SMSResult(); - var doc = JsonDocument.Parse(content); - result.Code = doc.RootElement.GetProperty("code").GetInt32(); - result.Data = doc.RootElement.GetProperty("data").GetString(); + var result = JsonSerializer.Deserialize(content, new JsonSerializerOptions() { PropertyNameCaseInsensitive = true }); #else var result = JsonConvert.DeserializeObject(content, new JsonSerializerSettings() { ContractResolver = new DefaultContractResolver() }); #endif From 7a9674187962af9a8fd186f7924c3d5276d9370c Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 4 Oct 2019 10:57:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?build(deploy):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BootstrapAdmin.sln | 12 ++++++------ init.sh | 2 +- {scripts => services}/ba.admin.service | 0 {scripts => services}/ba.client.service | 0 {scripts => services}/nginx.service | 0 5 files changed, 7 insertions(+), 7 deletions(-) rename {scripts => services}/ba.admin.service (100%) rename {scripts => services}/ba.client.service (100%) rename {scripts => services}/nginx.service (100%) diff --git a/BootstrapAdmin.sln b/BootstrapAdmin.sln index 97f98578..00c43c05 100644 --- a/BootstrapAdmin.sln +++ b/BootstrapAdmin.sln @@ -99,6 +99,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "linux", "linux", "{FDCFC3E3 ProjectSection(SolutionItems) = preProject deploy-admin.sh = deploy-admin.sh deploy-client.sh = deploy-client.sh + init.sh = init.sh publish-admin.sh = publish-admin.sh publish-client.sh = publish-client.sh watch-run-admin.sh = watch-run-admin.sh @@ -112,12 +113,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ci", "ci", "{5F732D4E-133B- appveyor.yml = appveyor.yml EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "service", "service", "{68F7C160-3FB2-4129-8F89-96F78B2DA0A9}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "services", "services", "{68F7C160-3FB2-4129-8F89-96F78B2DA0A9}" ProjectSection(SolutionItems) = preProject - scripts\ba.admin.service = scripts\ba.admin.service - scripts\ba.client.service = scripts\ba.client.service - init.sh = init.sh - scripts\nginx.service = scripts\nginx.service + services\ba.admin.service = services\ba.admin.service + services\ba.client.service = services\ba.client.service + services\nginx.service = services\nginx.service EndProjectSection EndProject Global @@ -176,7 +176,7 @@ Global {C6F2DCA0-7941-4C28-9328-2D495F5DCB00} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4} {FDCFC3E3-14CF-40B2-9FE5-5BC239AAC110} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4} {5F732D4E-133B-4DA6-811B-C369CDC3FB89} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4} - {68F7C160-3FB2-4129-8F89-96F78B2DA0A9} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4} + {68F7C160-3FB2-4129-8F89-96F78B2DA0A9} = {FDCFC3E3-14CF-40B2-9FE5-5BC239AAC110} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {221EAE38-5F75-4391-9A48-E462A9F3B8FC} diff --git a/init.sh b/init.sh index 08475d12..033ecb6f 100644 --- a/init.sh +++ b/init.sh @@ -8,7 +8,7 @@ cp ~/BootstrapAdmin/src/admin/Bootstrap.Admin/appsettings.json /usr/local/admin cp ~/BootstrapAdmin/src/admin/Bootstrap.Admin/BootstrapAdmin.db /usr/local/admin cp ~/BootstrapAdmin/src/client/Bootstrap.Client/appsettings.json /usr/local/client -cp * /usr/lib/systemd/system/ +cp ~/BootstrapAdmin/services/* /usr/lib/systemd/system systemctl enable ba.admin systemctl enable ba.client systemctl enable nginx diff --git a/scripts/ba.admin.service b/services/ba.admin.service similarity index 100% rename from scripts/ba.admin.service rename to services/ba.admin.service diff --git a/scripts/ba.client.service b/services/ba.client.service similarity index 100% rename from scripts/ba.client.service rename to services/ba.client.service diff --git a/scripts/nginx.service b/services/nginx.service similarity index 100% rename from scripts/nginx.service rename to services/nginx.service