MSP-7036 fix search by user.Id
This commit is contained in:
1 parent
d2da566f25
commit
a2c5dab4a7
8 files changed
+30
-9
No files matched your search
+2
-1
@@ -3,6 +3,7 @@ package repository
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"msp-admin-service/domain"
|
||||
@@ -351,7 +352,7 @@ func reqUsersQuery(q squirrel.SelectBuilder, reqQuery *domain.UserQuery) squirre
|
||||
}
|
||||
|
||||
if reqQuery.Id != nil {
|
||||
q = q.Where("id = ?", *reqQuery.Id)
|
||||
q = q.Where(squirrel.ILike{"id::text": strconv.Itoa(*reqQuery.Id) + "%"})
|
||||
}
|
||||
|
||||
if reqQuery.UserId != nil { // поиск в ui по имени, но в бд - по id юзера
|
||||
|
||||
Reference in new issue
Block a user