upgrade: init by i18n

add: batch delete peer
add: batch peer to addressbook
This commit is contained in:
ljw
2024-09-29 11:53:58 +08:00
parent 61fc53858b
commit 609dfaeea0
15 changed files with 249 additions and 26 deletions

View File

@@ -71,6 +71,11 @@ func (ps *PeerService) Delete(u *model.Peer) error {
return global.DB.Delete(u).Error
}
// BatchDelete
func (ps *PeerService) BatchDelete(ids []uint) error {
return global.DB.Where("row_id in (?)", ids).Delete(&model.Peer{}).Error
}
// Update 更新
func (ps *PeerService) Update(u *model.Peer) error {
return global.DB.Model(u).Updates(u).Error