mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
[fix]修改减少验证
This commit is contained in:
@@ -52,13 +52,13 @@ func (m *deviceModelImpl) Insert(data entity.Device) *entity.Device {
|
||||
}
|
||||
//3 添加设备
|
||||
err := tx.Table(m.table).Create(&data).Error
|
||||
biz.ErrIsNil(err, "添加设备失败")
|
||||
biz.ErrIsNilAppendErr(err, "添加设备失败")
|
||||
// 创建超级表 失败就
|
||||
if data.Pid != "" {
|
||||
err = createDeviceTable(data.Pid, data.Name)
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
biz.ErrIsNil(err, "添加设备失败,设备表创建失败")
|
||||
biz.ErrIsNil(err, "时序数据设备表创建失败")
|
||||
}
|
||||
}
|
||||
tx.Commit()
|
||||
|
||||
Reference in New Issue
Block a user