From 4c810fe81f671655cc14acbd5956c82e84ae37d6 Mon Sep 17 00:00:00 2001 From: dorlolo <428192774@qq.com> Date: Fri, 24 Mar 2023 11:49:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=81=97=E6=BC=8F?= =?UTF-8?q?=E7=9A=84=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/internal/dao/artistInfo_user.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/internal/dao/artistInfo_user.go b/cmd/internal/dao/artistInfo_user.go index 8b4421d..bbbde00 100644 --- a/cmd/internal/dao/artistInfo_user.go +++ b/cmd/internal/dao/artistInfo_user.go @@ -666,6 +666,9 @@ func GetViewUserList(req *artistInfoUser.FindUsersRequest) (resp []model.UserVie if req.IsArtist { tx = tx.Where("mgmt_artist_uid !='' ") } + if req.ArtistRealName != "" { + tx = tx.Where(fmt.Sprintf("real_name LIKE '%%%s%%'", req.ArtistRealName)) + } if req.Keyword != "" { searchWords := "%" + req.Keyword + "%" tx = tx.Where("real_name LIKE ? OR invited_code LIKE ? OR tel_num LIKE ?", searchWords, searchWords, searchWords) From 62b33d09bbfe2c604b2215a35909c99cdaeee103 Mon Sep 17 00:00:00 2001 From: dorlolo <428192774@qq.com> Date: Fri, 24 Mar 2023 12:13:09 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/internal/logic/artistinfo_artwork.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cmd/internal/logic/artistinfo_artwork.go b/cmd/internal/logic/artistinfo_artwork.go index 5e21a31..cf4d806 100644 --- a/cmd/internal/logic/artistinfo_artwork.go +++ b/cmd/internal/logic/artistinfo_artwork.go @@ -10,6 +10,8 @@ import ( "context" "errors" "fmt" + "strings" + "github.com/fonchain/fonchain-artistinfo/cmd/internal/dao" "github.com/fonchain/fonchain-artistinfo/cmd/model" "github.com/fonchain/fonchain-artistinfo/pb/artist" @@ -20,7 +22,6 @@ import ( "github.com/fonchain/fonchain-artistinfo/pkg/service" "github.com/fonchain/fonchain-artistinfo/pkg/util/stime" "google.golang.org/protobuf/types/known/emptypb" - "strings" ) type IArtistInfoArtwork interface { @@ -211,10 +212,11 @@ func (a ArtistInfoArtworkLogic) GenerateArtworkSupplementInfo(request *artistInf func (a ArtistInfoArtworkLogic) ArtworkStatic(request *artistInfoArtwork.ArtistArtworkStaticRequest) (res *artistInfoArtwork.ArtistArtworkStaticResponse, err error) { //查询画家宝中认证成功的用户 userList, _, err := dao.GetViewUserList(&artistInfoUser.FindUsersRequest{ - ArtistRealName: request.ArtistKeyWords, - Page: int32(request.Page), - PageSize: int32(request.PageSize), - IsArtist: true, + // ArtistRealName: request.ArtistKeyWords, + Keyword: request.ArtistKeyWords, + Page: int32(request.Page), + PageSize: int32(request.PageSize), + IsArtist: true, }) if err != nil { return nil, err