public ActionResult FinanceDetail(int id) { var question = _objService.Repository.GetByKey(id); List <QuestionImagesView> lst = _objImageService.GetListByQuestionID <QuestionImagesView>(id); if (question == null) { throw new Exception("fiance详细页列表为空"); } question.ReadCount++; _objService.Repository.Update(question, new List <string>() { "ReadCount" }); //记录用户行为 if (question.AppId != null) { ExecuteBehavior(question.AppId.Value, 3, "", id.ToString()); } var questionView = (QuestionManageView)(new QuestionManageView().ConvertAPIModel(question)); questionView.QuestionImages = lst; return(View(questionView)); }
public QuestionManageView GetQuestionDetail(string id, QuestionManage obj) { var questionView = (QuestionManageView)(new QuestionManageView().ConvertAPIModel(obj)); var qlst = _objQuetisonSubService.GetListByQuestionID <QuestionSubView>(int.Parse(id)); qlst.ForEach(x => { if (x.Type.Equals("Q")) { x.QuestionImages = _objImageService.GetListByQuestionID <QuestionImagesView>(x.Id); } }); questionView.SubList = qlst; return(questionView); }