diff --git a/.gitignore b/.gitignore index 32b88a0..8418e1c 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,4 @@ /test/JiShe.IoT.HttpApi.Client.ConsoleTestApp/bin/Release/net9.0 /test/JiShe.IoT.TestBase/bin/Release/net9.0 /host/JiShe.IoT.HttpApi.Host/UploadFile/20250729/host/abp-file-management +/host/JiShe.IoT.HttpApi.Host/UploadFile/20250731/host/abp-file-management/3a1b7059-f930-8a33-5a5b-a67f48f2feec diff --git a/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs b/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs index c5844af..75f830c 100644 --- a/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs +++ b/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs @@ -88,6 +88,8 @@ namespace JiShe.IoT.DeviceAggregation createDeviceInput.IoTPlatformAccountId = productInfo.OneNETAccountId; createDeviceInput.IoTPlatformDeviceOpenInfo = $"{input.IoTPlatformProductId}{input.DeviceAddress}"; createDeviceInput.PlatformPassword = productInfo.ProductAccesskey; + createDeviceInput.IoTPlatformProductName = productInfo.ProductName; + createDeviceInput.AccountPhoneNumber = productInfo.AccountPhoneNumber; var insertResult = await deviceAppService.CreateAsync(createDeviceInput); if (insertResult == null) diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730091642_InitialCreate.Designer.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250731021938_InitialCreate.Designer.cs similarity index 98% rename from src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730091642_InitialCreate.Designer.cs rename to src/JiShe.IoT.EntityFrameworkCore/Migrations/20250731021938_InitialCreate.Designer.cs index 7109888..8a39c36 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730091642_InitialCreate.Designer.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250731021938_InitialCreate.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace JiShe.IoT.Migrations { [DbContext(typeof(IoTDbContext))] - [Migration("20250730091642_InitialCreate")] + [Migration("20250731021938_InitialCreate")] partial class InitialCreate { /// @@ -250,6 +250,9 @@ namespace JiShe.IoT.Migrations b.Property("AccessType") .HasColumnType("int"); + b.Property("AccountPhoneNumber") + .HasColumnType("longtext"); + b.Property("AuthType") .HasColumnType("int"); @@ -551,6 +554,12 @@ namespace JiShe.IoT.Migrations b.Property("Id") .HasColumnType("char(36)"); + b.Property("AccountPhoneNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("账户手机号"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() @@ -586,6 +595,10 @@ namespace JiShe.IoT.Migrations .HasColumnType("varchar(128)") .HasComment("设备名称"); + b.Property("DeviceOnlineStatus") + .HasColumnType("int") + .HasComment("设备在线状态"); + b.Property("ExtraProperties") .HasColumnType("longtext") .HasColumnName("ExtraProperties") @@ -613,6 +626,12 @@ namespace JiShe.IoT.Migrations .HasColumnType("varchar(50)") .HasComment("物联网平台中对应的产品Id"); + b.Property("IoTPlatformProductName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("物联网平台中对应的产品Name"); + b.Property("IoTPlatformResponse") .HasColumnType("text") .HasComment("物联网平台返回的响应信息"); @@ -624,7 +643,8 @@ namespace JiShe.IoT.Migrations .HasColumnName("IsDeleted"); b.Property("IsPlatformPushSuccess") - .HasColumnType("tinyint(1)"); + .HasColumnType("tinyint(1)") + .HasComment("物联网平台推送是否成功"); b.Property("LastModificationTime") .HasColumnType("datetime(6)") @@ -634,6 +654,14 @@ namespace JiShe.IoT.Migrations .HasColumnType("char(36)") .HasColumnName("LastModifierId"); + b.Property("LastOfflineTime") + .HasColumnType("datetime(6)") + .HasComment("最后离线时间"); + + b.Property("LastOnlineTime") + .HasColumnType("datetime(6)") + .HasComment("最后在线时间"); + b.Property("OSACreatorId") .HasColumnType("int") .HasComment("旧系统授权创建者Id"); @@ -1347,6 +1375,11 @@ namespace JiShe.IoT.Migrations .HasColumnType("int") .HasComment("接入协议"); + b.Property("AccountPhoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("账户手机号"); + b.Property("Brand") .HasColumnType("longtext") .HasComment("产品品牌"); diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730091642_InitialCreate.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250731021938_InitialCreate.cs similarity index 98% rename from src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730091642_InitialCreate.cs rename to src/JiShe.IoT.EntityFrameworkCore/Migrations/20250731021938_InitialCreate.cs index a36349a..5af6778 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730091642_InitialCreate.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250731021938_InitialCreate.cs @@ -796,6 +796,8 @@ namespace JiShe.IoT.Migrations Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), CTWingAccountId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "账号ID") .Annotation("MySql:CharSet", "utf8mb4"), + AccountPhoneNumber = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), CommunicationAddress = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "通讯服务地址") .Annotation("MySql:CharSet", "utf8mb4"), MasterKey = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "OpenAPI 通信主密钥") @@ -872,11 +874,18 @@ namespace JiShe.IoT.Migrations .Annotation("MySql:CharSet", "utf8mb4"), IoTPlatformProductId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id") .Annotation("MySql:CharSet", "utf8mb4"), + IoTPlatformProductName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "物联网平台中对应的产品Name") + .Annotation("MySql:CharSet", "utf8mb4"), IoTPlatformAccountId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的账号Id") .Annotation("MySql:CharSet", "utf8mb4"), + AccountPhoneNumber = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "账户手机号") + .Annotation("MySql:CharSet", "utf8mb4"), IoTPlatformResponse = table.Column(type: "text", nullable: true, comment: "物联网平台返回的响应信息") .Annotation("MySql:CharSet", "utf8mb4"), - IsPlatformPushSuccess = table.Column(type: "tinyint(1)", nullable: false), + IsPlatformPushSuccess = table.Column(type: "tinyint(1)", nullable: false, comment: "物联网平台推送是否成功"), + DeviceOnlineStatus = table.Column(type: "int", nullable: true, comment: "设备在线状态"), + LastOnlineTime = table.Column(type: "datetime(6)", nullable: true, comment: "最后在线时间"), + LastOfflineTime = table.Column(type: "datetime(6)", nullable: true, comment: "最后离线时间"), ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), CreationTime = table.Column(type: "datetime(6)", nullable: false), @@ -996,6 +1005,8 @@ namespace JiShe.IoT.Migrations Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), OneNETAccountId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "账户Id") .Annotation("MySql:CharSet", "utf8mb4"), + AccountPhoneNumber = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "账户手机号") + .Annotation("MySql:CharSet", "utf8mb4"), IoTPlatformProductId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台对应的产品Id") .Annotation("MySql:CharSet", "utf8mb4"), ProductName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "产品名称") diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs index 1c82b3c..e1e9e08 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs @@ -247,6 +247,9 @@ namespace JiShe.IoT.Migrations b.Property("AccessType") .HasColumnType("int"); + b.Property("AccountPhoneNumber") + .HasColumnType("longtext"); + b.Property("AuthType") .HasColumnType("int"); @@ -548,6 +551,12 @@ namespace JiShe.IoT.Migrations b.Property("Id") .HasColumnType("char(36)"); + b.Property("AccountPhoneNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("账户手机号"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() @@ -583,6 +592,10 @@ namespace JiShe.IoT.Migrations .HasColumnType("varchar(128)") .HasComment("设备名称"); + b.Property("DeviceOnlineStatus") + .HasColumnType("int") + .HasComment("设备在线状态"); + b.Property("ExtraProperties") .HasColumnType("longtext") .HasColumnName("ExtraProperties") @@ -610,6 +623,12 @@ namespace JiShe.IoT.Migrations .HasColumnType("varchar(50)") .HasComment("物联网平台中对应的产品Id"); + b.Property("IoTPlatformProductName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("物联网平台中对应的产品Name"); + b.Property("IoTPlatformResponse") .HasColumnType("text") .HasComment("物联网平台返回的响应信息"); @@ -621,7 +640,8 @@ namespace JiShe.IoT.Migrations .HasColumnName("IsDeleted"); b.Property("IsPlatformPushSuccess") - .HasColumnType("tinyint(1)"); + .HasColumnType("tinyint(1)") + .HasComment("物联网平台推送是否成功"); b.Property("LastModificationTime") .HasColumnType("datetime(6)") @@ -631,6 +651,14 @@ namespace JiShe.IoT.Migrations .HasColumnType("char(36)") .HasColumnName("LastModifierId"); + b.Property("LastOfflineTime") + .HasColumnType("datetime(6)") + .HasComment("最后离线时间"); + + b.Property("LastOnlineTime") + .HasColumnType("datetime(6)") + .HasComment("最后在线时间"); + b.Property("OSACreatorId") .HasColumnType("int") .HasComment("旧系统授权创建者Id"); @@ -1344,6 +1372,11 @@ namespace JiShe.IoT.Migrations .HasColumnType("int") .HasComment("接入协议"); + b.Property("AccountPhoneNumber") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("账户手机号"); + b.Property("Brand") .HasColumnType("longtext") .HasComment("产品品牌");