李昊 пре 4 година
родитељ
комит
de222f3ee9

+ 4 - 0
gx_api/GxPress/Repository/GxPress.Repository.Implement/AdminRepository.cs

@@ -171,7 +171,11 @@ namespace GxPress.Repository.Implement
             var pagedList = new PagedList<AdminPageResult>();
             var query = Q.NewQuery();
             if (!string.IsNullOrEmpty(request.Keyword))
+            {
                 query.WhereLike(nameof(Admin.Name), $"%{request.Keyword}%");
+                query.OrWhereLike(nameof(Admin.Account), $"%{request.Keyword}%");
+                query.OrWhereLike(nameof(Admin.Phone), $"%{request.Keyword}%");
+            }
             pagedList.Total = await _repository.CountAsync(query);
             var list = await _repository.GetAllAsync(query);
             var items = list.Select(user => _mapper.Map<AdminPageResult>(user)).ToList();