feat(03.1-01): 补全 Gateway SyncDeviceInfoResp 缺失字段及 B 端 DeviceGatewayInfo DTO
- SyncDeviceInfoResp 新增 Rsrp/Rsrq/Sinr/WifiPassword/IPAddress/WANIP/LANIP/MaxClients/ConnectTime/Status/IMSI/ULStats/DLStats/LimitSpeed/SyncInterval 共 15 个字段 - asset_dto.go 新增 DeviceGatewayInfo B 端实时状态结构体(49 字段,全部含 description tag) - AssetRealtimeStatusResponse 新增 DeviceRealtime *DeviceGatewayInfo 字段 - AssetResolveResponse 新增 5 个设备 DB 缓存字段(online_status/last_online_time/software_version/switch_mode/last_gateway_sync_at)
This commit is contained in:
@@ -35,7 +35,8 @@ func (s *Service) GetWallet(ctx context.Context, assetType string, assetID uint)
|
||||
wallet, err := s.assetWalletStore.GetByResourceTypeAndID(ctx, resourceType, assetID)
|
||||
if err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
return nil, errors.New(errors.CodeNotFound, "该资产暂无钱包记录")
|
||||
// 暂无钱包记录属于正常业务状态(企业卡/未充值资产),返回 nil 而非错误
|
||||
return nil, nil
|
||||
}
|
||||
return nil, errors.Wrap(errors.CodeDatabaseError, err, "查询钱包失败")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user