Merge branch 'xjjdev' into dev

This commit is contained in:
徐俊杰 2023-03-27 11:14:23 +08:00
commit 5d3faa442c

View File

@ -211,7 +211,7 @@ func (a ArtistInfoArtworkLogic) GenerateArtworkSupplementInfo(request *artistInf
func (a ArtistInfoArtworkLogic) ArtworkStatic(request *artistInfoArtwork.ArtistArtworkStaticRequest) (res *artistInfoArtwork.ArtistArtworkStaticResponse, err error) {
//查询画家宝中认证成功的用户
userList, _, err := dao.GetViewUserList(&artistInfoUser.FindUsersRequest{
userList, total, err := dao.GetViewUserList(&artistInfoUser.FindUsersRequest{
// ArtistRealName: request.ArtistKeyWords,
Keyword: request.ArtistKeyWords,
Page: int32(request.Page),
@ -221,7 +221,7 @@ func (a ArtistInfoArtworkLogic) ArtworkStatic(request *artistInfoArtwork.ArtistA
if err != nil {
return nil, err
}
if userList == nil || len(userList) == 0 {
if len(userList) == 0 {
return nil, nil
}
var artistUids []string
@ -237,23 +237,21 @@ func (a ArtistInfoArtworkLogic) ArtworkStatic(request *artistInfoArtwork.ArtistA
}
//查询匹配的画家数据列表
artistList, err := service.GrpcArtistImpl.ArtistList(context.Background(), &artist.ArtistListRequest{
Keyword: request.ArtistKeyWords,
// Keyword: request.ArtistKeyWords,
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)
//查询这些画家审核通过的画作数据统计
res = &artistInfoArtwork.ArtistArtworkStaticResponse{
Page: int64(artistList.Count),
PageSize: int64(artistList.Page),
Total: request.PageSize,
Page: int64(artistList.Page),
PageSize: int64(request.PageSize),
Total: total,
}
viewDatas, err := dao.PassedArtworkStatic(request, artistUids)
if err != nil {