解决部分接口返回乱码的问题
This commit is contained in:
parent
39b455d9d7
commit
8ca969de7a
@ -1,7 +1,7 @@
|
|||||||
#FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
|
#FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
|
||||||
FROM registry.cn-qingdao.aliyuncs.com/jisheyun/aspnetcore:9.0.6_ub24_simsun_pdp_v341 AS base
|
FROM registry.cn-qingdao.aliyuncs.com/jisheyun/aspnetcore:9.0.6_ub24_simsun_pdp_v341 AS base
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
EXPOSE 8080
|
EXPOSE 10500
|
||||||
EXPOSE 443
|
EXPOSE 443
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
ENV ASPNETCORE_ENVIRONMENT=Production
|
ENV ASPNETCORE_ENVIRONMENT=Production
|
||||||
|
|||||||
@ -42,6 +42,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "0.Solution Items", "0.Solut
|
|||||||
Directory.Build.Volo.targets = Directory.Build.Volo.targets
|
Directory.Build.Volo.targets = Directory.Build.Volo.targets
|
||||||
Dockerfile = Dockerfile
|
Dockerfile = Dockerfile
|
||||||
NuGet.Config = NuGet.Config
|
NuGet.Config = NuGet.Config
|
||||||
|
sources.list = sources.list
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2.host", "2.host", "{8C1B8C6C-C518-4290-B070-622CCA6004DA}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2.host", "2.host", "{8C1B8C6C-C518-4290-B070-622CCA6004DA}"
|
||||||
@ -275,8 +276,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DockerComposeShells", "Dock
|
|||||||
DockerComposeShells\.env = DockerComposeShells\.env
|
DockerComposeShells\.env = DockerComposeShells\.env
|
||||||
DockerComposeShells\adminapi\conf\appsettings.Development.json = DockerComposeShells\adminapi\conf\appsettings.Development.json
|
DockerComposeShells\adminapi\conf\appsettings.Development.json = DockerComposeShells\adminapi\conf\appsettings.Development.json
|
||||||
DockerComposeShells\adminapi\conf\appsettings.json = DockerComposeShells\adminapi\conf\appsettings.json
|
DockerComposeShells\adminapi\conf\appsettings.json = DockerComposeShells\adminapi\conf\appsettings.json
|
||||||
DockerComposeShells\docker-compose-iotdb-standalone.yml = DockerComposeShells\docker-compose-iotdb-standalone.yml
|
|
||||||
DockerComposeShells\docker-compose-init.yml = DockerComposeShells\docker-compose-init.yml
|
DockerComposeShells\docker-compose-init.yml = DockerComposeShells\docker-compose-init.yml
|
||||||
|
DockerComposeShells\docker-compose-iotdb-standalone.yml = DockerComposeShells\docker-compose-iotdb-standalone.yml
|
||||||
DockerComposeShells\docker-compose.yml = DockerComposeShells\docker-compose.yml
|
DockerComposeShells\docker-compose.yml = DockerComposeShells\docker-compose.yml
|
||||||
DockerComposeShells\mysql\init\init-db.sql = DockerComposeShells\mysql\init\init-db.sql
|
DockerComposeShells\mysql\init\init-db.sql = DockerComposeShells\mysql\init\init-db.sql
|
||||||
DockerComposeShells\iotdb\init\init-iot-db.sql = DockerComposeShells\iotdb\init\init-iot-db.sql
|
DockerComposeShells\iotdb\init\init-iot-db.sql = DockerComposeShells\iotdb\init\init-iot-db.sql
|
||||||
|
|||||||
@ -3,6 +3,6 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<!--<add key="JiSheTeam" value="http://proget.jisheyun.com:9511/nuget/JiSheTeam/v3/index.json" protocolVersion="3" allowInsecureConnections="true" />-->
|
<!--<add key="JiSheTeam" value="http://proget.jisheyun.com:9511/nuget/JiSheTeam/v3/index.json" protocolVersion="3" allowInsecureConnections="true" />-->
|
||||||
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
|
<add key="nuget" value="https://nuget.cdn.azure.cn/v3/index.json" />
|
||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
122
host/JiShe.IoT.HttpApi.Host/Dockerfile
Normal file
122
host/JiShe.IoT.HttpApi.Host/Dockerfile
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
# 此阶段用于在快速模式(默认为调试配置)下从 VS 运行时
|
||||||
|
FROM registry.cn-qingdao.aliyuncs.com/jisheyun/aspnetcore:9.0.6_ub24_simsun_pdp_v341 AS base
|
||||||
|
USER $APP_UID
|
||||||
|
WORKDIR /app
|
||||||
|
EXPOSE 10500
|
||||||
|
|
||||||
|
|
||||||
|
# 此阶段用于生成服务项目
|
||||||
|
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
||||||
|
ARG BUILD_CONFIGURATION=Release
|
||||||
|
WORKDIR /src
|
||||||
|
COPY ["Directory.Build.props", "."]
|
||||||
|
COPY ["JiShe.ServicePro/Directory.Build.props", "JiShe.ServicePro/"]
|
||||||
|
COPY ["Directory.Build.targets", "."]
|
||||||
|
COPY ["JiShe.ServicePro/Directory.Build.targets", "JiShe.ServicePro/"]
|
||||||
|
COPY ["NuGet.Config", "."]
|
||||||
|
COPY ["JiShe.ServicePro/NuGet.Config", "JiShe.ServicePro/"]
|
||||||
|
COPY ["host/JiShe.IoT.HttpApi.Host/JiShe.IoT.HttpApi.Host.csproj", "host/JiShe.IoT.HttpApi.Host/"]
|
||||||
|
COPY ["src/JiShe.IoT.Application/JiShe.IoT.Application.csproj", "src/JiShe.IoT.Application/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/BasicManagement/src/JiShe.ServicePro.BasicManagement.Application/JiShe.ServicePro.BasicManagement.Application.csproj", "JiShe.ServicePro/modules/BasicManagement/src/JiShe.ServicePro.BasicManagement.Application/"]
|
||||||
|
COPY ["JiShe.ServicePro/frameworks/src/JiShe.ServicePro.Oidc/JiShe.ServicePro.Oidc.csproj", "JiShe.ServicePro/frameworks/src/JiShe.ServicePro.Oidc/"]
|
||||||
|
COPY ["JiShe.ServicePro/frameworks/src/JiShe.ServicePro.Core/JiShe.ServicePro.Core.csproj", "JiShe.ServicePro/frameworks/src/JiShe.ServicePro.Core/"]
|
||||||
|
COPY ["JiShe.ServicePro/shared/JiShe.ServicePro.Shared.ApacheIoTDB/JiShe.ServicePro.Shared.ApacheIoTDB.csproj", "JiShe.ServicePro/shared/JiShe.ServicePro.Shared.ApacheIoTDB/"]
|
||||||
|
COPY ["JiShe.ServicePro/frameworks/src/JiShe.ServicePro.Localization/JiShe.ServicePro.Localization.csproj", "JiShe.ServicePro/frameworks/src/JiShe.ServicePro.Localization/"]
|
||||||
|
COPY ["JiShe.ServicePro/frameworks/src/JiShe.ServicePro.TwoFactor/JiShe.ServicePro.TwoFactor.csproj", "JiShe.ServicePro/frameworks/src/JiShe.ServicePro.TwoFactor/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/BasicManagement/src/JiShe.ServicePro.BasicManagement.Application.Contracts/JiShe.ServicePro.BasicManagement.Application.Contracts.csproj", "JiShe.ServicePro/modules/BasicManagement/src/JiShe.ServicePro.BasicManagement.Application.Contracts/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/BasicManagement/src/JiShe.ServicePro.BasicManagement.Domain.Shared/JiShe.ServicePro.BasicManagement.Domain.Shared.csproj", "JiShe.ServicePro/modules/BasicManagement/src/JiShe.ServicePro.BasicManagement.Domain.Shared/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/BasicManagement/src/JiShe.ServicePro.BasicManagement.Domain/JiShe.ServicePro.BasicManagement.Domain.csproj", "JiShe.ServicePro/modules/BasicManagement/src/JiShe.ServicePro.BasicManagement.Domain/"]
|
||||||
|
COPY ["JiShe.ServicePro/frameworks/src/JiShe.ServicePro.FreeRedisProvider/JiShe.ServicePro.FreeRedisProvider.csproj", "JiShe.ServicePro/frameworks/src/JiShe.ServicePro.FreeRedisProvider/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/CTWingManagement/src/JiShe.ServicePro.CTWingManagement.Application/JiShe.ServicePro.CTWingManagement.Application.csproj", "JiShe.ServicePro/modules/CTWingManagement/src/JiShe.ServicePro.CTWingManagement.Application/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/IoTDBManagement/src/JiShe.ServicePro.IoTDBManagement.Application/JiShe.ServicePro.IoTDBManagement.Application.csproj", "JiShe.ServicePro/modules/IoTDBManagement/src/JiShe.ServicePro.IoTDBManagement.Application/"]
|
||||||
|
COPY ["JiShe.ServicePro/frameworks/src/JiShe.ServicePro.Kafka/JiShe.ServicePro.Kafka.csproj", "JiShe.ServicePro/frameworks/src/JiShe.ServicePro.Kafka/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/IoTDBManagement/src/JiShe.ServicePro.IoTDBManagement.Application.Contracts/JiShe.ServicePro.IoTDBManagement.Application.Contracts.csproj", "JiShe.ServicePro/modules/IoTDBManagement/src/JiShe.ServicePro.IoTDBManagement.Application.Contracts/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/IoTDBManagement/src/JiShe.ServicePro.IoTDBManagement.Domain.Shared/JiShe.ServicePro.IoTDBManagement.Domain.Shared.csproj", "JiShe.ServicePro/modules/IoTDBManagement/src/JiShe.ServicePro.IoTDBManagement.Domain.Shared/"]
|
||||||
|
COPY ["JiShe.ServicePro/frameworks/src/JiShe.ServicePro.ApacheIoTDB.Provider/JiShe.ServicePro.ApacheIoTDB.Provider.csproj", "JiShe.ServicePro/frameworks/src/JiShe.ServicePro.ApacheIoTDB.Provider/"]
|
||||||
|
COPY ["JiShe.ServicePro/frameworks/src/JiShe.ServicePro.ApacheIoTDB.Analyzers/JiShe.ServicePro.ApacheIoTDB.Analyzers.csproj", "JiShe.ServicePro/frameworks/src/JiShe.ServicePro.ApacheIoTDB.Analyzers/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/IoTDBManagement/src/JiShe.ServicePro.IoTDBManagement.Domain/JiShe.ServicePro.IoTDBManagement.Domain.csproj", "JiShe.ServicePro/modules/IoTDBManagement/src/JiShe.ServicePro.IoTDBManagement.Domain/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/CTWingManagement/src/JiShe.ServicePro.CTWingManagement.Application.Contracts/JiShe.ServicePro.CTWingManagement.Application.Contracts.csproj", "JiShe.ServicePro/modules/CTWingManagement/src/JiShe.ServicePro.CTWingManagement.Application.Contracts/"]
|
||||||
|
COPY ["JiShe.ServicePro/frameworks/src/JiShe.ServicePro.CTWingAep.Provider/JiShe.ServicePro.CTWingAep.Provider.csproj", "JiShe.ServicePro/frameworks/src/JiShe.ServicePro.CTWingAep.Provider/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/CTWingManagement/src/JiShe.ServicePro.CTWingManagement.Domain.Shared/JiShe.ServicePro.CTWingManagement.Domain.Shared.csproj", "JiShe.ServicePro/modules/CTWingManagement/src/JiShe.ServicePro.CTWingManagement.Domain.Shared/"]
|
||||||
|
COPY ["JiShe.ServicePro/frameworks/src/JiShe.ServicePro.FreeSqlProvider/JiShe.ServicePro.FreeSqlProvider.csproj", "JiShe.ServicePro/frameworks/src/JiShe.ServicePro.FreeSqlProvider/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/CTWingManagement/src/JiShe.ServicePro.CTWingManagement.Domain/JiShe.ServicePro.CTWingManagement.Domain.csproj", "JiShe.ServicePro/modules/CTWingManagement/src/JiShe.ServicePro.CTWingManagement.Domain/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DataDictionaryManagement/src/JiShe.ServicePro.DataDictionaryManagement.Application/JiShe.ServicePro.DataDictionaryManagement.Application.csproj", "JiShe.ServicePro/modules/DataDictionaryManagement/src/JiShe.ServicePro.DataDictionaryManagement.Application/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DataDictionaryManagement/src/JiShe.ServicePro.DataDictionaryManagement.Application.Contracts/JiShe.ServicePro.DataDictionaryManagement.Application.Contracts.csproj", "JiShe.ServicePro/modules/DataDictionaryManagement/src/JiShe.ServicePro.DataDictionaryManagement.Application.Contracts/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DataDictionaryManagement/src/JiShe.ServicePro.DataDictionaryManagement.Domain.Shared/JiShe.ServicePro.DataDictionaryManagement.Domain.Shared.csproj", "JiShe.ServicePro/modules/DataDictionaryManagement/src/JiShe.ServicePro.DataDictionaryManagement.Domain.Shared/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DataDictionaryManagement/src/JiShe.ServicePro.DataDictionaryManagement.Domain/JiShe.ServicePro.DataDictionaryManagement.Domain.csproj", "JiShe.ServicePro/modules/DataDictionaryManagement/src/JiShe.ServicePro.DataDictionaryManagement.Domain/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DeviceManagement/src/JiShe.ServicePro.DeviceManagement.Application/JiShe.ServicePro.DeviceManagement.Application.csproj", "JiShe.ServicePro/modules/DeviceManagement/src/JiShe.ServicePro.DeviceManagement.Application/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DeviceManagement/src/JiShe.ServicePro.DeviceManagement.Application.Contracts/JiShe.ServicePro.DeviceManagement.Application.Contracts.csproj", "JiShe.ServicePro/modules/DeviceManagement/src/JiShe.ServicePro.DeviceManagement.Application.Contracts/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DeviceManagement/src/JiShe.ServicePro.DeviceManagement.Domain.Shared/JiShe.ServicePro.DeviceManagement.Domain.Shared.csproj", "JiShe.ServicePro/modules/DeviceManagement/src/JiShe.ServicePro.DeviceManagement.Domain.Shared/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DeviceManagement/src/JiShe.ServicePro.DeviceManagement.Domain/JiShe.ServicePro.DeviceManagement.Domain.csproj", "JiShe.ServicePro/modules/DeviceManagement/src/JiShe.ServicePro.DeviceManagement.Domain/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DynamicMenuManagement/src/JiShe.ServicePro.DynamicMenuManagement.Application/JiShe.ServicePro.DynamicMenuManagement.Application.csproj", "JiShe.ServicePro/modules/DynamicMenuManagement/src/JiShe.ServicePro.DynamicMenuManagement.Application/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DynamicMenuManagement/src/JiShe.ServicePro.DynamicMenuManagement.Application.Contracts/JiShe.ServicePro.DynamicMenuManagement.Application.Contracts.csproj", "JiShe.ServicePro/modules/DynamicMenuManagement/src/JiShe.ServicePro.DynamicMenuManagement.Application.Contracts/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DynamicMenuManagement/src/JiShe.ServicePro.DynamicMenuManagement.Domain.Shared/JiShe.ServicePro.DynamicMenuManagement.Domain.Shared.csproj", "JiShe.ServicePro/modules/DynamicMenuManagement/src/JiShe.ServicePro.DynamicMenuManagement.Domain.Shared/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DynamicMenuManagement/src/JiShe.ServicePro.DynamicMenuManagement.Domain/JiShe.ServicePro.DynamicMenuManagement.Domain.csproj", "JiShe.ServicePro/modules/DynamicMenuManagement/src/JiShe.ServicePro.DynamicMenuManagement.Domain/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/FileManagement/src/JiShe.ServicePro.FileManagement.Application/JiShe.ServicePro.FileManagement.Application.csproj", "JiShe.ServicePro/modules/FileManagement/src/JiShe.ServicePro.FileManagement.Application/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/FileManagement/src/JiShe.ServicePro.FileManagement.Application.Contracts/JiShe.ServicePro.FileManagement.Application.Contracts.csproj", "JiShe.ServicePro/modules/FileManagement/src/JiShe.ServicePro.FileManagement.Application.Contracts/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/FileManagement/src/JiShe.ServicePro.FileManagement.Domain.Shared/JiShe.ServicePro.FileManagement.Domain.Shared.csproj", "JiShe.ServicePro/modules/FileManagement/src/JiShe.ServicePro.FileManagement.Domain.Shared/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/FileManagement/src/JiShe.ServicePro.FileManagement.Domain/JiShe.ServicePro.FileManagement.Domain.csproj", "JiShe.ServicePro/modules/FileManagement/src/JiShe.ServicePro.FileManagement.Domain/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/LanguageManagement/src/JiShe.ServicePro.LanguageManagement.Application/JiShe.ServicePro.LanguageManagement.Application.csproj", "JiShe.ServicePro/modules/LanguageManagement/src/JiShe.ServicePro.LanguageManagement.Application/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/LanguageManagement/src/JiShe.ServicePro.LanguageManagement.Application.Contracts/JiShe.ServicePro.LanguageManagement.Application.Contracts.csproj", "JiShe.ServicePro/modules/LanguageManagement/src/JiShe.ServicePro.LanguageManagement.Application.Contracts/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/LanguageManagement/src/JiShe.ServicePro.LanguageManagement.Domain.Shared/JiShe.ServicePro.LanguageManagement.Domain.Shared.csproj", "JiShe.ServicePro/modules/LanguageManagement/src/JiShe.ServicePro.LanguageManagement.Domain.Shared/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/LanguageManagement/src/JiShe.ServicePro.LanguageManagement.Domain/JiShe.ServicePro.LanguageManagement.Domain.csproj", "JiShe.ServicePro/modules/LanguageManagement/src/JiShe.ServicePro.LanguageManagement.Domain/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/NotificationManagement/src/JiShe.ServicePro.NotificationManagement.Application/JiShe.ServicePro.NotificationManagement.Application.csproj", "JiShe.ServicePro/modules/NotificationManagement/src/JiShe.ServicePro.NotificationManagement.Application/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/NotificationManagement/src/JiShe.ServicePro.NotificationManagement.Application.Contracts/JiShe.ServicePro.NotificationManagement.Application.Contracts.csproj", "JiShe.ServicePro/modules/NotificationManagement/src/JiShe.ServicePro.NotificationManagement.Application.Contracts/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/NotificationManagement/src/JiShe.ServicePro.NotificationManagement.Domain.Shared/JiShe.ServicePro.NotificationManagement.Domain.Shared.csproj", "JiShe.ServicePro/modules/NotificationManagement/src/JiShe.ServicePro.NotificationManagement.Domain.Shared/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/NotificationManagement/src/JiShe.ServicePro.NotificationManagement.Domain/JiShe.ServicePro.NotificationManagement.Domain.csproj", "JiShe.ServicePro/modules/NotificationManagement/src/JiShe.ServicePro.NotificationManagement.Domain/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/TemplateManagement/src/JiShe.ServicePro.TemplateManagement.Application/JiShe.ServicePro.TemplateManagement.Application.csproj", "JiShe.ServicePro/modules/TemplateManagement/src/JiShe.ServicePro.TemplateManagement.Application/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/TemplateManagement/src/JiShe.ServicePro.TemplateManagement.Application.Contracts/JiShe.ServicePro.TemplateManagement.Application.Contracts.csproj", "JiShe.ServicePro/modules/TemplateManagement/src/JiShe.ServicePro.TemplateManagement.Application.Contracts/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/TemplateManagement/src/JiShe.ServicePro.TemplateManagement.Domain.Shared/JiShe.ServicePro.TemplateManagement.Domain.Shared.csproj", "JiShe.ServicePro/modules/TemplateManagement/src/JiShe.ServicePro.TemplateManagement.Domain.Shared/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/TemplateManagement/src/JiShe.ServicePro.TemplateManagement.Domain/JiShe.ServicePro.TemplateManagement.Domain.csproj", "JiShe.ServicePro/modules/TemplateManagement/src/JiShe.ServicePro.TemplateManagement.Domain/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/OneNETManagement/src/JiShe.ServicePro.OneNETManagement.Application/JiShe.ServicePro.OneNETManagement.Application.csproj", "JiShe.ServicePro/modules/OneNETManagement/src/JiShe.ServicePro.OneNETManagement.Application/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/OneNETManagement/src/JiShe.ServicePro.OneNETManagement.Application.Contracts/JiShe.ServicePro.OneNETManagement.Application.Contracts.csproj", "JiShe.ServicePro/modules/OneNETManagement/src/JiShe.ServicePro.OneNETManagement.Application.Contracts/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/OneNETManagement/src/JiShe.ServicePro.OneNETManagement.Domain.Shared/JiShe.ServicePro.OneNETManagement.Domain.Shared.csproj", "JiShe.ServicePro/modules/OneNETManagement/src/JiShe.ServicePro.OneNETManagement.Domain.Shared/"]
|
||||||
|
COPY ["JiShe.ServicePro/frameworks/src/JiShe.ServicePro.PulsarProvider/JiShe.ServicePro.PulsarProvider.csproj", "JiShe.ServicePro/frameworks/src/JiShe.ServicePro.PulsarProvider/"]
|
||||||
|
COPY ["JiShe.ServicePro/frameworks/src/JiShe.ServicePro.OneNET.Provider/JiShe.ServicePro.OneNET.Provider.csproj", "JiShe.ServicePro/frameworks/src/JiShe.ServicePro.OneNET.Provider/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/OneNETManagement/src/JiShe.ServicePro.OneNETManagement.Domain/JiShe.ServicePro.OneNETManagement.Domain.csproj", "JiShe.ServicePro/modules/OneNETManagement/src/JiShe.ServicePro.OneNETManagement.Domain/"]
|
||||||
|
COPY ["src/JiShe.IoT.Application.Contracts/JiShe.IoT.Application.Contracts.csproj", "src/JiShe.IoT.Application.Contracts/"]
|
||||||
|
COPY ["src/JiShe.IoT.Domain.Shared/JiShe.IoT.Domain.Shared.csproj", "src/JiShe.IoT.Domain.Shared/"]
|
||||||
|
COPY ["src/JiShe.IoT.Domain/JiShe.IoT.Domain.csproj", "src/JiShe.IoT.Domain/"]
|
||||||
|
COPY ["src/JiShe.IoT.EntityFrameworkCore/JiShe.IoT.EntityFrameworkCore.csproj", "src/JiShe.IoT.EntityFrameworkCore/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/BasicManagement/src/JiShe.ServicePro.BasicManagement.EntityFrameworkCore/JiShe.ServicePro.BasicManagement.EntityFrameworkCore.csproj", "JiShe.ServicePro/modules/BasicManagement/src/JiShe.ServicePro.BasicManagement.EntityFrameworkCore/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/CTWingManagement/src/JiShe.ServicePro.CTWingManagement.EntityFrameworkCore/JiShe.ServicePro.CTWingManagement.EntityFrameworkCore.csproj", "JiShe.ServicePro/modules/CTWingManagement/src/JiShe.ServicePro.CTWingManagement.EntityFrameworkCore/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DataDictionaryManagement/src/JiShe.ServicePro.DataDictionaryManagement.EntityFrameworkCore/JiShe.ServicePro.DataDictionaryManagement.EntityFrameworkCore.csproj", "JiShe.ServicePro/modules/DataDictionaryManagement/src/JiShe.ServicePro.DataDictionaryManagement.EntityFrameworkCore/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DeviceManagement/src/JiShe.ServicePro.DeviceManagement.EntityFrameworkCore/JiShe.ServicePro.DeviceManagement.EntityFrameworkCore.csproj", "JiShe.ServicePro/modules/DeviceManagement/src/JiShe.ServicePro.DeviceManagement.EntityFrameworkCore/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DynamicMenuManagement/src/JiShe.ServicePro.DynamicMenuManagement.EntityFrameworkCore/JiShe.ServicePro.DynamicMenuManagement.EntityFrameworkCore.csproj", "JiShe.ServicePro/modules/DynamicMenuManagement/src/JiShe.ServicePro.DynamicMenuManagement.EntityFrameworkCore/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/FileManagement/src/JiShe.ServicePro.FileManagement.EntityFrameworkCore/JiShe.ServicePro.FileManagement.EntityFrameworkCore.csproj", "JiShe.ServicePro/modules/FileManagement/src/JiShe.ServicePro.FileManagement.EntityFrameworkCore/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/IoTDBManagement/src/JiShe.ServicePro.IoTDBManagement.EntityFrameworkCore/JiShe.ServicePro.IoTDBManagement.EntityFrameworkCore.csproj", "JiShe.ServicePro/modules/IoTDBManagement/src/JiShe.ServicePro.IoTDBManagement.EntityFrameworkCore/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/LanguageManagement/src/JiShe.ServicePro.LanguageManagement.EntityFrameworkCore/JiShe.ServicePro.LanguageManagement.EntityFrameworkCore.csproj", "JiShe.ServicePro/modules/LanguageManagement/src/JiShe.ServicePro.LanguageManagement.EntityFrameworkCore/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/NotificationManagement/src/JiShe.ServicePro.NotificationManagement.EntityFrameworkCore/JiShe.ServicePro.NotificationManagement.EntityFrameworkCore.csproj", "JiShe.ServicePro/modules/NotificationManagement/src/JiShe.ServicePro.NotificationManagement.EntityFrameworkCore/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/TemplateManagement/src/JiShe.ServicePro.TemplateManagement.EntityFrameworkCore/JiShe.ServicePro.TemplateManagement.EntityFrameworkCore.csproj", "JiShe.ServicePro/modules/TemplateManagement/src/JiShe.ServicePro.TemplateManagement.EntityFrameworkCore/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/OneNETManagement/src/JiShe.ServicePro.OneNETManagement.EntityFrameworkCore/JiShe.ServicePro.OneNETManagement.EntityFrameworkCore.csproj", "JiShe.ServicePro/modules/OneNETManagement/src/JiShe.ServicePro.OneNETManagement.EntityFrameworkCore/"]
|
||||||
|
COPY ["src/JiShe.IoT.HttpApi/JiShe.IoT.HttpApi.csproj", "src/JiShe.IoT.HttpApi/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/BasicManagement/src/JiShe.ServicePro.BasicManagement.HttpApi/JiShe.ServicePro.BasicManagement.HttpApi.csproj", "JiShe.ServicePro/modules/BasicManagement/src/JiShe.ServicePro.BasicManagement.HttpApi/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/CTWingManagement/src/JiShe.ServicePro.CTWingManagement.HttpApi/JiShe.ServicePro.CTWingManagement.HttpApi.csproj", "JiShe.ServicePro/modules/CTWingManagement/src/JiShe.ServicePro.CTWingManagement.HttpApi/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DataDictionaryManagement/src/JiShe.ServicePro.DataDictionaryManagement.HttpApi/JiShe.ServicePro.DataDictionaryManagement.HttpApi.csproj", "JiShe.ServicePro/modules/DataDictionaryManagement/src/JiShe.ServicePro.DataDictionaryManagement.HttpApi/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DeviceManagement/src/JiShe.ServicePro.DeviceManagement.HttpApi/JiShe.ServicePro.DeviceManagement.HttpApi.csproj", "JiShe.ServicePro/modules/DeviceManagement/src/JiShe.ServicePro.DeviceManagement.HttpApi/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/DynamicMenuManagement/src/JiShe.ServicePro.DynamicMenuManagement.HttpApi/JiShe.ServicePro.DynamicMenuManagement.HttpApi.csproj", "JiShe.ServicePro/modules/DynamicMenuManagement/src/JiShe.ServicePro.DynamicMenuManagement.HttpApi/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/FileManagement/src/JiShe.ServicePro.FileManagement.HttpApi/JiShe.ServicePro.FileManagement.HttpApi.csproj", "JiShe.ServicePro/modules/FileManagement/src/JiShe.ServicePro.FileManagement.HttpApi/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/IoTDBManagement/src/JiShe.ServicePro.IoTDBManagement.HttpApi/JiShe.ServicePro.IoTDBManagement.HttpApi.csproj", "JiShe.ServicePro/modules/IoTDBManagement/src/JiShe.ServicePro.IoTDBManagement.HttpApi/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/LanguageManagement/src/JiShe.ServicePro.LanguageManagement.HttpApi/JiShe.ServicePro.LanguageManagement.HttpApi.csproj", "JiShe.ServicePro/modules/LanguageManagement/src/JiShe.ServicePro.LanguageManagement.HttpApi/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/NotificationManagement/src/JiShe.ServicePro.NotificationManagement.HttpApi/JiShe.ServicePro.NotificationManagement.HttpApi.csproj", "JiShe.ServicePro/modules/NotificationManagement/src/JiShe.ServicePro.NotificationManagement.HttpApi/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/TemplateManagement/src/JiShe.ServicePro.TemplateManagement.HttpApi/JiShe.ServicePro.TemplateManagement.HttpApi.csproj", "JiShe.ServicePro/modules/TemplateManagement/src/JiShe.ServicePro.TemplateManagement.HttpApi/"]
|
||||||
|
COPY ["JiShe.ServicePro/modules/OneNETManagement/src/JiShe.ServicePro.OneNETManagement.HttpApi/JiShe.ServicePro.OneNETManagement.HttpApi.csproj", "JiShe.ServicePro/modules/OneNETManagement/src/JiShe.ServicePro.OneNETManagement.HttpApi/"]
|
||||||
|
COPY ["JiShe.ServicePro/frameworks/src/JiShe.ServicePro.CAP.EntityFrameworkCore/JiShe.ServicePro.CAP.EntityFrameworkCore.csproj", "JiShe.ServicePro/frameworks/src/JiShe.ServicePro.CAP.EntityFrameworkCore/"]
|
||||||
|
COPY ["JiShe.ServicePro/frameworks/src/JiShe.ServicePro.CAP/JiShe.ServicePro.CAP.csproj", "JiShe.ServicePro/frameworks/src/JiShe.ServicePro.CAP/"]
|
||||||
|
COPY ["JiShe.ServicePro/shared/JiShe.ServicePro.Shared.Hosting.Microservices/JiShe.ServicePro.Shared.Hosting.Microservices.csproj", "JiShe.ServicePro/shared/JiShe.ServicePro.Shared.Hosting.Microservices/"]
|
||||||
|
COPY ["JiShe.ServicePro/frameworks/src/JiShe.ServicePro.ModelBinder.Provider/JiShe.ServicePro.ModelBinder.Provider.csproj", "JiShe.ServicePro/frameworks/src/JiShe.ServicePro.ModelBinder.Provider/"]
|
||||||
|
RUN dotnet restore "./host/JiShe.IoT.HttpApi.Host/JiShe.IoT.HttpApi.Host.csproj"
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/host/JiShe.IoT.HttpApi.Host"
|
||||||
|
RUN dotnet build "./JiShe.IoT.HttpApi.Host.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||||
|
|
||||||
|
# 此阶段用于发布要复制到最终阶段的服务项目
|
||||||
|
FROM build AS publish
|
||||||
|
ARG BUILD_CONFIGURATION=Release
|
||||||
|
RUN dotnet publish "./JiShe.IoT.HttpApi.Host.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
||||||
|
|
||||||
|
# 此阶段在生产中使用,或在常规模式下从 VS 运行时使用(在不使用调试配置时为默认值)
|
||||||
|
FROM base AS final
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=publish /app/publish .
|
||||||
|
ENTRYPOINT ["dotnet", "JiShe.IoT.HttpApi.Host.dll"]
|
||||||
@ -7,11 +7,14 @@
|
|||||||
<PreserveCompilationReferences>true</PreserveCompilationReferences>
|
<PreserveCompilationReferences>true</PreserveCompilationReferences>
|
||||||
<UserSecretsId>JiShe.IoT-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
|
<UserSecretsId>JiShe.IoT-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
|
||||||
<ServerGarbageCollection>true</ServerGarbageCollection>
|
<ServerGarbageCollection>true</ServerGarbageCollection>
|
||||||
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
|
<DockerfileContext>..\..</DockerfileContext>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" />
|
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" />
|
||||||
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.22.1" />
|
||||||
<PackageReference Include="Volo.Abp.Account.Web" />
|
<PackageReference Include="Volo.Abp.Account.Web" />
|
||||||
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy" />
|
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy" />
|
||||||
<PackageReference Include="Volo.Abp.Autofac" />
|
<PackageReference Include="Volo.Abp.Autofac" />
|
||||||
|
|||||||
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ActiveDebugProfile>Container (Dockerfile)</ActiveDebugProfile>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
@ -3,10 +3,20 @@
|
|||||||
"JiShe.IoT.HttpApi.Host": {
|
"JiShe.IoT.HttpApi.Host": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"applicationUrl": "http://localhost:10500",
|
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
},
|
||||||
|
"applicationUrl": "http://localhost:10500"
|
||||||
|
},
|
||||||
|
"Container (Dockerfile)": {
|
||||||
|
"commandName": "Docker",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_HTTP_PORTS": "10500"
|
||||||
|
},
|
||||||
|
"publishAllPorts": true,
|
||||||
|
"useSSL": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
10
sources.list
Normal file
10
sources.list
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
deb http://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse
|
||||||
|
deb-src http://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse
|
||||||
|
deb http://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse
|
||||||
|
deb-src http://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse
|
||||||
|
deb http://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse
|
||||||
|
deb-src http://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse
|
||||||
|
deb http://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse
|
||||||
|
deb-src http://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse
|
||||||
|
deb http://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse
|
||||||
|
deb-src http://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse
|
||||||
@ -33,9 +33,5 @@ namespace JiShe.IoT.BusinessSystemAggregation
|
|||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<HttpDataResult> BatchCreateDeviceInfoAsync(OpenApiRequest input);
|
Task<HttpDataResult> BatchCreateDeviceInfoAsync(OpenApiRequest input);
|
||||||
|
|
||||||
Task<string> BatchCreateDeviceInfoAsync2(OpenApiRequest input);
|
|
||||||
|
|
||||||
Task<HttpDataResult> BatchCreateDeviceInfoAsync3(OpenApiRequest input);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,9 +76,5 @@ namespace JiShe.IoT.DeviceAggregation
|
|||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<bool> BatchCreateDeviceBusinessSystemAsync(BatchCreateDeviceAggregationInput input);
|
Task<bool> BatchCreateDeviceBusinessSystemAsync(BatchCreateDeviceAggregationInput input);
|
||||||
|
|
||||||
|
|
||||||
Task<HttpDataResult> BatchCreateDeviceInfoAsync();
|
|
||||||
Task<string> BatchCreateDeviceInfoAsync2();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -221,41 +221,5 @@ namespace JiShe.IoT.BusinessSystemAggregation
|
|||||||
return HttpDataResultExtensions.Failed($"查询设备数据失败,发送异常:{ex.Message}", -106);
|
return HttpDataResultExtensions.Failed($"查询设备数据失败,发送异常:{ex.Message}", -106);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 业务系统批量新增设备数据,Msg 字段为 BatchCreateDeviceInfoInput 实体
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="input"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<string> BatchCreateDeviceInfoAsync2(OpenApiRequest input)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return "新增设备成功";
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
return ex.Message;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 业务系统批量新增设备数据,Msg 字段为 BatchCreateDeviceInfoInput 实体
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="input"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<HttpDataResult> BatchCreateDeviceInfoAsync3(OpenApiRequest input)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return HandleOpenApiRequest<BatchCreateDeviceInfoInput>(input, new ServerApplicationOptions());
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
return HttpDataResultExtensions.Failed($"业务系统批量新增设备数据,发送异常:{ex.Message}", -106);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -439,40 +439,6 @@ namespace JiShe.IoT.DeviceAggregation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 业务系统批量新增设备数据,Msg 字段为 BatchCreateDeviceInfoInput 实体
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="input"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<HttpDataResult> BatchCreateDeviceInfoAsync()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return HandleOpenApiRequest<BatchCreateDeviceInfoInput>(null, null);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
return HttpDataResultExtensions.Failed($"查询设备数据失败,发送异常:{ex.Message}", -106);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 业务系统批量新增设备数据,Msg 字段为 BatchCreateDeviceInfoInput 实体
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="input"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<string> BatchCreateDeviceInfoAsync2()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return "新增设备成功";
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
return ex.Message;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// OneNET设备批量创建
|
/// OneNET设备批量创建
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using JiShe.ServicePro;
|
using JiShe.ServicePro;
|
||||||
using JiShe.ServicePro.ApacheIoTDB.Provider.Options;
|
using JiShe.ServicePro.ApacheIoTDB.Provider.Options;
|
||||||
using JiShe.ServicePro.Consts;
|
using JiShe.ServicePro.Consts;
|
||||||
using JiShe.ServicePro.Core;
|
using JiShe.ServicePro.Core;
|
||||||
@ -26,12 +26,12 @@ namespace JiShe.IoT
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取设备遥测指令信息
|
/// 获取设备遥测指令信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="iotDBOptions">IoTDBOptions</param>
|
/// <param name="iotDBOptions">IoTDBOptions</param>
|
||||||
/// <param name="input">请求原始对象</param>
|
/// <param name="input">请求原始对象</param>
|
||||||
/// <param name="deviceInfo">设备信息</param>
|
/// <param name="deviceInfo">设备信息</param>
|
||||||
/// <param name="messageBody">明文消息体</param>
|
/// <param name="messageBody">明文消息体</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <exception cref="UserFriendlyException"></exception>
|
/// <exception cref="UserFriendlyException"></exception>
|
||||||
protected DeviceTelemetryPacketTaskInfo GetDeviceTelemetryPacketTaskInfo(IoTDBOptions iotDBOptions, OpenApiRequest input, DeviceCacheInfos deviceInfo,string messageBody)
|
protected DeviceTelemetryPacketTaskInfo GetDeviceTelemetryPacketTaskInfo(IoTDBOptions iotDBOptions, OpenApiRequest input, DeviceCacheInfos deviceInfo,string messageBody)
|
||||||
@ -40,9 +40,9 @@ namespace JiShe.IoT
|
|||||||
{
|
{
|
||||||
if (iotDBOptions == null || string.IsNullOrWhiteSpace(iotDBOptions.DataBaseName) || input == null || deviceInfo == null || string.IsNullOrWhiteSpace(messageBody))
|
if (iotDBOptions == null || string.IsNullOrWhiteSpace(iotDBOptions.DataBaseName) || input == null || deviceInfo == null || string.IsNullOrWhiteSpace(messageBody))
|
||||||
{
|
{
|
||||||
throw new UserFriendlyException($"设备遥测指令创建失败,参数信息异常。");
|
throw new UserFriendlyException($"设备遥测指令创建失败,参数信息异常。");
|
||||||
}
|
}
|
||||||
//反序列化消息数据,得到数据实体
|
//反序列化消息数据,得到数据实体
|
||||||
ReceiveCommandInfoDto commandIssueInfo = input.Message.Deserialize<ReceiveCommandInfoDto>();
|
ReceiveCommandInfoDto commandIssueInfo = input.Message.Deserialize<ReceiveCommandInfoDto>();
|
||||||
|
|
||||||
var oneNETIssueMessageEntity = new DeviceTelemetryPacketTaskInfo()
|
var oneNETIssueMessageEntity = new DeviceTelemetryPacketTaskInfo()
|
||||||
@ -76,38 +76,38 @@ namespace JiShe.IoT
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 处理开放接口请求
|
/// 处理开放接口请求
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T"></typeparam>
|
/// <typeparam name="T"></typeparam>
|
||||||
/// <param name="input">接口请求体</param>
|
/// <param name="input">接口请求体</param>
|
||||||
/// <param name="serverOptions">服务配置</param>
|
/// <param name="serverOptions">服务配置</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected HttpDataResult<T> HandleOpenApiRequest<T>(OpenApiRequest input, ServerApplicationOptions serverOptions) where T : class
|
protected HttpDataResult<T> HandleOpenApiRequest<T>(OpenApiRequest input, ServerApplicationOptions serverOptions) where T : class
|
||||||
{
|
{
|
||||||
if (input == null || serverOptions == null || string.IsNullOrWhiteSpace(input.Message) || string.IsNullOrWhiteSpace(input.Nonce) || string.IsNullOrWhiteSpace(input.Signature))
|
if (input == null || serverOptions == null || string.IsNullOrWhiteSpace(input.Message) || string.IsNullOrWhiteSpace(input.Nonce) || string.IsNullOrWhiteSpace(input.Signature))
|
||||||
{
|
{
|
||||||
return HttpDataResultExtensions.Failed<T>(null, "请求参数不能为空", -1101);
|
return HttpDataResultExtensions.Failed<T>(null, "请求参数不能为空", -1101);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (input.Timestamp <= 946656000000)//时间戳小于2000年,视为错误
|
if (input.Timestamp <= 946656000000)//时间戳小于2000年,视为错误
|
||||||
{
|
{
|
||||||
return HttpDataResultExtensions.Failed<T>(null, "时间戳异常", -1102);
|
return HttpDataResultExtensions.Failed<T>(null, "时间戳异常", -1102);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool verifySignatureReult = EncryptUtil.OpenApiVerifySignature(input.Message, input.Nonce, input.Timestamp, input.Signature, serverOptions.SignatureToken);
|
bool verifySignatureReult = EncryptUtil.OpenApiVerifySignature(input.Message, input.Nonce, input.Timestamp, input.Signature, serverOptions.SignatureToken);
|
||||||
if (verifySignatureReult == false)//签名校验失败
|
if (verifySignatureReult == false)//签名校验失败
|
||||||
{
|
{
|
||||||
return HttpDataResultExtensions.Failed<T>(null, "签名校验失败", -1103);
|
return HttpDataResultExtensions.Failed<T>(null, "签名校验失败", -1103);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//判断是否需要解密
|
//判断是否需要解密
|
||||||
T messageBody = default;
|
T messageBody = default;
|
||||||
string tempMessageBody = null;
|
string tempMessageBody = null;
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(input.Message))
|
if (string.IsNullOrWhiteSpace(input.Message))
|
||||||
{
|
{
|
||||||
return HttpDataResultExtensions.Success(messageBody, "签名校验成功,没有请求体");
|
return HttpDataResultExtensions.Success(messageBody, "签名校验成功,没有请求体");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (serverOptions.IsAesEncrypted && !string.IsNullOrWhiteSpace(serverOptions.AesSecurityKey))
|
if (serverOptions.IsAesEncrypted && !string.IsNullOrWhiteSpace(serverOptions.AesSecurityKey))
|
||||||
@ -123,7 +123,7 @@ namespace JiShe.IoT
|
|||||||
|
|
||||||
if (messageBody == null)
|
if (messageBody == null)
|
||||||
{
|
{
|
||||||
return HttpDataResultExtensions.Failed<T>(null, "获取数据体失败", -1104);
|
return HttpDataResultExtensions.Failed<T>(null, "获取数据体失败", -1104);
|
||||||
}
|
}
|
||||||
|
|
||||||
return HttpDataResultExtensions.Success(messageBody, tempMessageBody);
|
return HttpDataResultExtensions.Success(messageBody, tempMessageBody);
|
||||||
|
|||||||
@ -45,26 +45,5 @@ namespace JiShe.IoT.Controllers
|
|||||||
{
|
{
|
||||||
return await _businessSystemAggregationService.BatchCreateDeviceInfoAsync(input);
|
return await _businessSystemAggregationService.BatchCreateDeviceInfoAsync(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 业务系统批量新增设备数据
|
|
||||||
/// </summary>
|
|
||||||
[HttpPost(nameof(BatchCreateDeviceInfoAsync2))]
|
|
||||||
[SwaggerOperation(summary: "业务系统批量新增设备数据", Tags = new[] { "AggregationBusiness" })]
|
|
||||||
public async Task<string> BatchCreateDeviceInfoAsync2(OpenApiRequest input)
|
|
||||||
{
|
|
||||||
return await _businessSystemAggregationService.BatchCreateDeviceInfoAsync2(input);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 业务系统批量新增设备数据
|
|
||||||
/// </summary>
|
|
||||||
[HttpPost(nameof(BatchCreateDeviceInfoAsync3))]
|
|
||||||
[SwaggerOperation(summary: "业务系统批量新增设备数据", Tags = new[] { "AggregationBusiness" })]
|
|
||||||
public async Task<HttpDataResult> BatchCreateDeviceInfoAsync3(OpenApiRequest input)
|
|
||||||
{
|
|
||||||
return await _businessSystemAggregationService.BatchCreateDeviceInfoAsync3(input);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -87,30 +87,5 @@ namespace JiShe.IoT.Controllers
|
|||||||
return _deviceAggregationService.DeviceCommandForApiAsync(input);
|
return _deviceAggregationService.DeviceCommandForApiAsync(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 发送设备指令信息
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="input"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost(nameof(BatchCreateDeviceInfoAsync))]
|
|
||||||
[SwaggerOperation(summary: "发送设备指令信息", Tags = new[] { "AggregationDevice" })]
|
|
||||||
public Task<HttpDataResult> BatchCreateDeviceInfoAsync()
|
|
||||||
{
|
|
||||||
return _deviceAggregationService.BatchCreateDeviceInfoAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 发送设备指令信息
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="input"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost(nameof(BatchCreateDeviceInfoAsync2))]
|
|
||||||
[SwaggerOperation(summary: "发送设备指令信息", Tags = new[] { "AggregationDevice" })]
|
|
||||||
public Task<string> BatchCreateDeviceInfoAsync2()
|
|
||||||
{
|
|
||||||
return _deviceAggregationService.BatchCreateDeviceInfoAsync2();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user