fix: C端资产详情设备补充已连接数(client_number)字段
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
Gateway sync-info 返回的 client_number 字段未在整条数据链路中传递, 导致 C 端资产详情的设备实时状态缺少已连接客户端数。 修改范围: - Gateway 模型 SyncDeviceInfoResp 新增 ClientNumber - B 端 DTO DeviceGatewayInfo 新增 ClientNumber - C 端 DTO DeviceRealtimeInfo 新增 ClientNumber - 两层映射函数同步补充字段传递
This commit is contained in:
@@ -653,6 +653,10 @@ func mapDeviceGatewayInfoToClientInfo(g *dto.DeviceGatewayInfo) *dto.DeviceRealt
|
||||
v := int64(*g.MaxClients)
|
||||
info.MaxClients = &v
|
||||
}
|
||||
if g.ClientNumber != nil {
|
||||
v := int64(*g.ClientNumber)
|
||||
info.ClientNumber = &v
|
||||
}
|
||||
info.SoftwareVersion = g.SoftwareVersion
|
||||
if g.SwitchMode != nil {
|
||||
// SwitchMode 在 B 端为字符串("0"/"1"),C 端为整型(0/1),需解析转换
|
||||
|
||||
Reference in New Issue
Block a user