Compare commits

..

1 Commits

Author SHA1 Message Date
ljw
30d254eaef fix #55 2024-11-09 20:14:14 +08:00

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
} }