This commit is contained in:
ljw
2024-11-09 20:14:14 +08:00
parent de712ba9c5
commit 4915cfa9ba

View File

@@ -42,11 +42,13 @@ func (ps *PeerService) UuidBindUserId(deviceId string, uuid string, userId uint)
ps.Update(peer) ps.Update(peer)
} else { } else {
// 不存在则创建 // 不存在则创建
/*if deviceId != "" {
global.DB.Create(&model.Peer{ global.DB.Create(&model.Peer{
Id: deviceId, Id: deviceId,
Uuid: uuid, Uuid: uuid,
UserId: userId, UserId: userId,
}) })
}*/
} }
} }
@@ -143,4 +145,3 @@ func (ps *PeerService) BatchDelete(ids []uint) error {
func (ps *PeerService) Update(u *model.Peer) error { func (ps *PeerService) Update(u *model.Peer) error {
return global.DB.Model(u).Updates(u).Error return global.DB.Model(u).Updates(u).Error
} }