优化筛选条件
This commit is contained in:
parent
2aea6debbb
commit
c81515d1d2
@ -661,7 +661,7 @@ func GetViewUserList(req *artistInfoUser.FindUsersRequest) (resp []model.UserVie
|
||||
tx = tx.Where("mgmt_artist_uid in ?", req.MgmtArtistUids)
|
||||
}
|
||||
if req.InviterName != "" {
|
||||
tx = tx.Where("inviter_real_name LIKE '%?%'", req.InviterName)
|
||||
tx = tx.Where("inviter_real_name LIKE ?", "%"+req.InviterName+"%")
|
||||
}
|
||||
if req.IsArtist {
|
||||
tx = tx.Where("mgmt_artist_uid !='' ")
|
||||
@ -1124,7 +1124,7 @@ func GetInviteStaticList(in *artistInfoUser.GetInviteStaticListRequest) (res *ar
|
||||
Where("su.deleted_at=0").
|
||||
Group("ui.invite_code") //HAVING count(ui.invited_code) >0
|
||||
if in.KeyWords != "" {
|
||||
orm = orm.Where("rn.name LIKE '%%?%%' OR su.tel_num LIKE '%%?%%' OR su.invited_code LIKE '%%?%%' ", in.KeyWords, in.KeyWords, in.KeyWords)
|
||||
orm = orm.Where(fmt.Sprintf("rn.name LIKE '%%%v%%' OR su.tel_num LIKE '%%%v%%' OR su.invited_code LIKE '%%%v%%' ", in.KeyWords, in.KeyWords, in.KeyWords))
|
||||
}
|
||||
var datas []inviteStatic
|
||||
err = orm.Count(&res.Page.Total).Scopes(db.Pagination(in.Page, in.PageSize)).Find(&datas).Error
|
||||
|
Loading…
Reference in New Issue
Block a user