using IRaCIS.Application.Interfaces; using IRaCIS.Application.Contracts; using Microsoft.AspNetCore.Mvc; namespace IRaCIS.Application.Services { [ApiExplorerSettings(GroupName = "Reviewer")] public class ResearchPublicationService : BaseService, IResearchPublicationService { private readonly IRepository researchPublicationRepository; public ResearchPublicationService(IRepository _researchPublicationRepository) { researchPublicationRepository = _researchPublicationRepository; } /// /// 查询-医生科学研究信息 /// /// 医生Id /// [HttpGet("{doctorId:guid}")] public async Task GetResearchPublication(Guid doctorId) { var doctorScientificResearchInfo = await researchPublicationRepository.Where(o => o.DoctorId == doctorId) .ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); return doctorScientificResearchInfo; } [HttpPost] public async Task AddOrUpdateResearchPublication(ResearchPublicationDTO param) { var entity = await _repository.InsertOrUpdateAsync(param, true); return ResponseOutput.Ok(entity.Id); } } }