Browse Source

修复stop 问题 没有更新状态

feature/x1-web-request
root 2 days ago
parent
commit
6b5f3c721c
  1. 2
      src/X1.Application/Features/DeviceRuntimes/Commands/StopDeviceRuntime/StopDeviceRuntimeCommandHandler.cs
  2. 5
      src/X1.Domain/Entities/Device/CellularDeviceRuntime.cs

2
src/X1.Application/Features/DeviceRuntimes/Commands/StopDeviceRuntime/StopDeviceRuntimeCommandHandler.cs

@ -210,7 +210,7 @@ public class StopDeviceRuntimeCommandHandler : IRequestHandler<StopDeviceRuntime
ErrorMessage = "设备运行时状态不存在" ErrorMessage = "设备运行时状态不存在"
}; };
} }
deviceRuntime.Stop();
// 创建运行时详情 // 创建运行时详情
var detail = CellularDeviceRuntimeDetail.Create( var detail = CellularDeviceRuntimeDetail.Create(
deviceCode, deviceCode,

5
src/X1.Domain/Entities/Device/CellularDeviceRuntime.cs

@ -72,4 +72,9 @@ public class CellularDeviceRuntime : BaseEntity
NetworkStackCode = networkStackCode; NetworkStackCode = networkStackCode;
RuntimeCode = runtimeCode; RuntimeCode = runtimeCode;
} }
public void Stop()
{
RuntimeStatus = DeviceRuntimeStatus.Stopping;
}
} }
Loading…
Cancel
Save