Merge pull request 'Search by phone number' (#2) from customer-search into main
Reviewed-on: https://git.altru.id/Enaaklo-Pos/enaklo-pos-backend/pulls/2
This commit is contained in:
commit
7931f884ee
@ -138,7 +138,7 @@ func (b *UserRepository) GetAllCustomer(ctx context.Context, req entity.Customer
|
||||
Where("users.user_type = 'CUSTOMER'")
|
||||
|
||||
if req.Search != "" {
|
||||
query = query.Where("users.name ILIKE ? or users.email ILIKE ? or r.role_name ILIKE ? or b.name ILIKE ? ", "%"+req.Search+"%", "%"+req.Search+"%", "%"+req.Search+"%", "%"+req.Search+"%")
|
||||
query = query.Where("users.name ILIKE ? or users.email ILIKE ? or users.phone_number ILIKE ? or r.role_name ILIKE ? or b.name ILIKE ?", "%"+req.Search+"%", "%"+req.Search+"%", "%"+req.Search+"%", "%"+req.Search+"%", "%"+req.Search+"%")
|
||||
}
|
||||
|
||||
if req.Name != "" {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user