using IRaCIS.Application.Contracts; using IRaCIS.Application.Interfaces; using Microsoft.AspNetCore.Mvc; namespace IRaCIS.Core.Application.Service { [ApiExplorerSettings(GroupName = "Reviewer")] public class ResearchPublicationService(IRepository _researchPublicationRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IResearchPublicationService { /// /// 查询-医生科学研究信息 /// /// 医生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 _researchPublicationRepository.InsertOrUpdateAsync(param, true); return ResponseOutput.Ok(entity.Id); } } }