From 35be09b37cb670329882be563f5b4ebd44a3a9ca Mon Sep 17 00:00:00 2001 From: lejianwen <84855512@qq.com> Date: Sat, 15 Mar 2025 21:02:47 +0800 Subject: [PATCH] fix: Get Uuids --- service/peer.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/service/peer.go b/service/peer.go index 1e2649d..cf96271 100644 --- a/service/peer.go +++ b/service/peer.go @@ -126,7 +126,14 @@ func (ps *PeerService) GetUuidListByIDs(ids []uint) ([]string, error) { err := DB.Model(&model.Peer{}). Where("row_id in (?)", ids). Pluck("uuid", &uuids).Error - return uuids, err + //过滤uuids中的空字符串 + var newUuids []string + for _, uuid := range uuids { + if uuid != "" { + newUuids = append(newUuids, uuid) + } + } + return newUuids, err } // BatchDelete 批量删除, 同时也应该删除token