public IActionResult GetUserListByDeptId(int pageIndex, int rowCount, string deptId) { /*判断是否合法*/ if (ModelState.IsValid) { try { if (string.IsNullOrEmpty(deptId)) { deptId = User.Identities.First(u => u.IsAuthenticated).FindFirst("UsrDeptId").Value; } IList <HelpCenter.Model.DbModel.DbDeptUserModel> usrList = Usr.GetListByDeptId(pageIndex, rowCount, out int _totalCount, out int _pageCount, deptId); return(null == usrList ? Ok(new { result = false, tips = ResponseMessageTips.MSG_USR_INFO_NO_FOUND }) : Ok(new { result = true, tips = ResponseMessageTips.MSG_PROCESS_SUCCESS, data = new { totalCount = _totalCount, pageCount = _pageCount, info = usrList } })); } catch (Exception e) { return(Ok(new { result = false, tips = ResponseMessageTips.MSG_PROCESS_EXCEPTION + e.Message.ToString() })); } } return(Ok(new { result = false, tips = ResponseMessageTips.MSG_PROCESS_DATA_FORMAT_ERROR })); }