public List <User> getMySchoolSuperiorsByGetData(getDataModel getDataModel) { if (getDataModel.userDepartment == "全部院系") { return(_userRepository.Get(p => p.userMerit.Contains(getDataModel.searchWrite) && p.userSchool == loginUser.userSchool, getDataModel.groupNumber, 10, p => p.userRank, false).ToList()); } else { return(_userRepository.Get(p => p.userMerit.Contains(getDataModel.searchWrite) && p.userDepart == getDataModel.userDepartment && p.userSchool == loginUser.userSchool, getDataModel.groupNumber, 10, p => p.userRank, false).ToList()); } }
public List <User> getAllSuperiorsByGetData(getDataModel getDataModel) { return(_userRepository.Get(p => p.userMerit.Contains(getDataModel.searchWrite), getDataModel.groupNumber, 10, p => p.userRank, false).ToList()); }
public List <Question> getHotQuestionByWrite(getDataModel DataModel) { return(_questionRepository.Get(o => o.questionTitle.Contains(DataModel.searchWrite), DataModel.groupNumber, 5, o => o.questionReplyNum, false).ToList()); }
public List <Question> getWaitReplyQuestionByWrite(getDataModel DataModel) { return(_questionRepository.Get(o => o.questionTitle.Contains(DataModel.searchWrite) && o.newReplyUserId == null, DataModel.groupNumber, 5, o => o.questionTime, false).ToList()); }
public ActionResult getData(getDataModel getDataModel) { List <User> user = null; if (getDataModel.whatOnactive == "校内") { if (getDataModel.searchWrite == null) { user = _userService.getMySchoolSuperiors(getDataModel.groupNumber, getDataModel.userDepartment, loginUser.userSchool); } else { user = _userService.getMySchoolSuperiorsByGetData(getDataModel); } } else if (getDataModel.whatOnactive == "全部") { if (getDataModel.searchWrite == null) { if (getDataModel.userSchool == "全部大学") { if (getDataModel.userDepartment == "全部院系") { user = _userService.getAllSuperiors(getDataModel.groupNumber).ToList(); } else { user = _userService.getAllSuperiorsByDepart(getDataModel.userDepartment); } } else { if (getDataModel.userDepartment == "全部院系") { user = _userService.getAllSuperiorsBySchool(getDataModel.userSchool); } else { user = _userService.getAllSuperiorsBySchoolDepart(getDataModel.userSchool, getDataModel.userDepartment); } } } else { if (getDataModel.userSchool == "全部大学") { if (getDataModel.userDepartment == "全部院系") { user = _userService.getAllSuperiorsByGetData(getDataModel); //byWrite } else { user = _userService.getAllSuperiorsByWriteDepart(getDataModel.searchWrite, getDataModel.userDepartment); } } else { if (getDataModel.userDepartment == "全部院系") { user = _userService.getAllSuperiorsByWriteSchool(getDataModel.searchWrite, getDataModel.userSchool); } else { user = _userService.getAllSuperiorsByWriteSchoolDepart(getDataModel.searchWrite, getDataModel.userSchool, getDataModel.userDepartment); } } } } List <SuperiorModel> result = _userService.selectSuperiorData(user); var JsonResult = Util.JsonHelper.Jso_ToJSON(result); return(Json(JsonResult)); }