修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
15b094a422
commit
7dc1205bb6
|
@ -105,6 +105,7 @@ public class TrialFileTypeService(IRepository<TrialFileType> _trialFileTypeRepos
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 复制系统数据到项目
|
/// 复制系统数据到项目
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -217,6 +218,23 @@ public class TrialFileTypeService(IRepository<TrialFileType> _trialFileTypeRepos
|
||||||
var file = await _trialFileRepository.Where(x => x.Id == trialFileType.FileRecordId).ProjectTo<TrialFileDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
var file = await _trialFileRepository.Where(x => x.Id == trialFileType.FileRecordId).ProjectTo<TrialFileDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除入项记录
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="trialFileTypeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> DeleteTrialTypeFile(Guid trialFileTypeId)
|
||||||
|
{
|
||||||
|
var trialFileType = await _trialFileTypeRepository.Where(x => x.Id == trialFileTypeId).FirstNotNullAsync();
|
||||||
|
|
||||||
|
await _trialFileRepository.DeleteFromQueryAsync(x => x.Id == trialFileType.FileRecordId, true);
|
||||||
|
await _trialFileTypeRepository.UpdatePartialFromQueryAsync(x => x.Id == trialFileTypeId, x => new TrialFileType() { FileRecordId = null }, true);
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue