mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
【feat】添加tcp指令下发
This commit is contained in:
@@ -61,7 +61,7 @@ func (m *deviceModelImpl) Insert(data entity.Device) *entity.Device {
|
||||
func (m *deviceModelImpl) FindOne(id string) *entity.DeviceRes {
|
||||
resData := new(entity.DeviceRes)
|
||||
db := global.Db.Table(m.table).Where("id = ?", id)
|
||||
err := db.First(resData).Preload("Product").Preload("DeviceGroup").Error
|
||||
err := db.Preload("Product").Preload("DeviceGroup").First(resData).Error
|
||||
biz.ErrIsNil(err, "查询设备失败")
|
||||
return resData
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user