From 02930a50be03b873f7eab96e1e4a07db269e2c33 Mon Sep 17 00:00:00 2001 From: jjxu <428192774@qq.com> Date: Mon, 27 Mar 2023 10:02:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=BB=E5=AE=B6=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=97=B6total=E5=80=BC=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/internal/logic/artistinfo_artwork.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/cmd/internal/logic/artistinfo_artwork.go b/cmd/internal/logic/artistinfo_artwork.go index bf9e174..409ca5f 100644 --- a/cmd/internal/logic/artistinfo_artwork.go +++ b/cmd/internal/logic/artistinfo_artwork.go @@ -241,13 +241,24 @@ func (a ArtistInfoArtworkLogic) ArtworkStatic(request *artistInfoArtwork.ArtistA Page: 1, PageSize: -1, Gender: gender, - Uids: artistUids, + // Uids: artistUids, //直接搜会导致Count值不对,手动筛选 }) if err != nil { return nil, err } - fmt.Println("\n artistUids:", artistUids, "\n") - fmt.Printf("\n\n artistList.Data: %+v\n\n", artistList.Data) + //手动筛选uid + var datas []*artist.ProfileRequest + for i, v := range artistList.Data { + if len(datas) == len(artistUids) { + break + } + for _, uid := range artistUids { + if uid == v.Uid { + datas = append(datas, artistList.Data[i]) + break + } + } + } //查询这些画家审核通过的画作数据统计 res = &artistInfoArtwork.ArtistArtworkStaticResponse{