/// <summary> /// 用户详情 /// </summary> /// <param name="id">用户Id</param> /// <returns></returns> public async Task <IActionResult> Detail(int id) { var user = await _userService.Get(id); var diagnose = await _diagnoseService.Get(id) ?? new Diagnose(); var treatList = await _treatService.GetList(id) ?? new List <Treat>(); var treatImageList = await _treatImageService.GetListByUser(id) ?? new List <TreatImage>(); var model = new Tuple <UserDto, Diagnose, List <Treat>, List <TreatImage> >(Mapper.Map <User, UserDto>(user), diagnose, treatList, treatImageList); return(View(model)); }
public async Task <WebAPIOutput <Diagnose> > Get(int userId) { var diagnose = await _diagnoseService.Get(userId); return(WebAPIOutput <Diagnose> .Success(diagnose)); }