添加遗漏的筛选条件

This commit is contained in:
徐俊杰 2023-03-24 11:49:09 +08:00
parent e04e6ba2c8
commit 4c810fe81f

View File

@ -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)