diff --git a/JiShe.ServicePro b/JiShe.ServicePro index 8abbb98..10b46cf 160000 --- a/JiShe.ServicePro +++ b/JiShe.ServicePro @@ -1 +1 @@ -Subproject commit 8abbb9899b01f6bc94a0d699cedc00cfbf2cbd7e +Subproject commit 10b46cf5ae3d45d61e494478ea8a17ded5b60b44 diff --git a/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs b/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs index eefbd8c..c5844af 100644 --- a/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs +++ b/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs @@ -69,7 +69,7 @@ namespace JiShe.IoT.DeviceAggregation CreateDeviceInput createDeviceInput = input.Adapt(); var productInfo = await FreeSqlDbContext.Instance.Select() - .Where(e => e.IsEnabled == true && e.IoTPlatformProductId == input.IoTPlatformProductId) + .Where(e => e.IoTPlatformProductId == input.IoTPlatformProductId)//此处不需要过滤产品状态,方便测试产品配置信息是否准确,避免跟车间生产搞混 .FirstAsync(); if (productInfo == null) @@ -113,6 +113,7 @@ namespace JiShe.IoT.DeviceAggregation UpdateDeviceInput updateDeviceInput = insertResult.Adapt(); updateDeviceInput.IoTPlatformResponse = pushResult.Serialize(); + updateDeviceInput.IsPlatformPushSuccess = true; var updateResult = await deviceAppService.UpdateAsync(updateDeviceInput); if (updateResult == null) @@ -124,6 +125,7 @@ namespace JiShe.IoT.DeviceAggregation //设备数据缓存到Redis DeviceCacheInfos deviceCacheInfos = insertResult.Adapt(); deviceCacheInfos.IoTPlatformResponse = updateDeviceInput.IoTPlatformResponse; + RedisProvider.Instance.HSet(RedisConst.CacheAllDeviceInfoHashKey, insertResult.DeviceAddress, deviceCacheInfos); return true; diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730030313_InitialCreate.Designer.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730091642_InitialCreate.Designer.cs similarity index 99% rename from src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730030313_InitialCreate.Designer.cs rename to src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730091642_InitialCreate.Designer.cs index 6c2e49f..7109888 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730030313_InitialCreate.Designer.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730091642_InitialCreate.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace JiShe.IoT.Migrations { [DbContext(typeof(IoTDbContext))] - [Migration("20250730030313_InitialCreate")] + [Migration("20250730091642_InitialCreate")] partial class InitialCreate { /// @@ -614,9 +614,7 @@ namespace JiShe.IoT.Migrations .HasComment("物联网平台中对应的产品Id"); b.Property("IoTPlatformResponse") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("text") .HasComment("物联网平台返回的响应信息"); b.Property("IsDeleted") diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730030313_InitialCreate.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730091642_InitialCreate.cs similarity index 99% rename from src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730030313_InitialCreate.cs rename to src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730091642_InitialCreate.cs index 1e95702..a36349a 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730030313_InitialCreate.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250730091642_InitialCreate.cs @@ -874,7 +874,7 @@ namespace JiShe.IoT.Migrations .Annotation("MySql:CharSet", "utf8mb4"), IoTPlatformAccountId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的账号Id") .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatformResponse = table.Column(type: "varchar(512)", maxLength: 512, nullable: false, comment: "物联网平台返回的响应信息") + IoTPlatformResponse = table.Column(type: "text", nullable: true, comment: "物联网平台返回的响应信息") .Annotation("MySql:CharSet", "utf8mb4"), IsPlatformPushSuccess = table.Column(type: "tinyint(1)", nullable: false), ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs index 9e14868..1c82b3c 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs @@ -611,9 +611,7 @@ namespace JiShe.IoT.Migrations .HasComment("物联网平台中对应的产品Id"); b.Property("IoTPlatformResponse") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("text") .HasComment("物联网平台返回的响应信息"); b.Property("IsDeleted")