李昊 4 年之前
父节点
当前提交
de222f3ee9
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      gx_api/GxPress/Repository/GxPress.Repository.Implement/AdminRepository.cs

+ 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();