public IActionResult Query(int cityId, string countyName = "", int pageIndex = 1, int pageSize = 10) { if (string.IsNullOrEmpty(countyName) && cityId < 1) { return(NotFound()); } if (pageIndex < 1) { return(BadRequest("页码不能小于1!")); } if (pageSize < 1) { return(BadRequest("每页条数不能小于1!")); } return(Ok(_countyRepository.GetCountyPage(cityId, countyName, pageIndex, pageSize))); }