public async Task <List <ComplaintFollowUp> > GetListAsync(ComplaintFollowUpDto dto, CancellationToken token = default) { using (var db = new GuoGuoCommunityContext()) { return(await db.ComplaintFollowUps.Where(x => x.IsDeleted == false && x.ComplaintId.ToString() == dto.ComplaintId && x.OwnerCertificationRecordId.ToString() == dto.OwnerCertificationId).ToListAsync(token)); } }
public async Task <ComplaintFollowUp> AddAsync(ComplaintFollowUpDto dto, CancellationToken token = default) { using (var db = new GuoGuoCommunityContext()) { if (!Guid.TryParse(dto.ComplaintId, out var complaintId)) { throw new NotImplementedException("投诉Id信息不正确!"); } //var complaintFollowUp = await db.Complaints.Where(x => x.Id == complaintId && x.IsDeleted == false).FirstOrDefaultAsync(token); //if (complaintFollowUp == null) //{ // throw new NotImplementedException("投诉不存在!"); //} var entity = db.ComplaintFollowUps.Add(new ComplaintFollowUp { ComplaintId = complaintId, Description = dto.Description, OperationDepartmentName = dto.OperationDepartmentName, OperationDepartmentValue = dto.OperationDepartmentValue, CreateOperationTime = dto.OperationTime, CreateOperationUserId = dto.OperationUserId, LastOperationTime = dto.OperationTime, LastOperationUserId = dto.OperationUserId, //OwnerCertificationRecordId =Guid.Parse(dto.OwnerCertificationId), Aappeal = dto.Aappeal }); if (!string.IsNullOrWhiteSpace(dto.OwnerCertificationId)) { entity.OwnerCertificationRecordId = Guid.Parse(dto.OwnerCertificationId); } await db.SaveChangesAsync(token); return(entity); } throw new NotImplementedException(); }
public Task <List <ComplaintFollowUp> > GetAllIncludeAsync(ComplaintFollowUpDto dto, CancellationToken token = default) { throw new NotImplementedException(); }
public Task DeleteAsync(ComplaintFollowUpDto dto, CancellationToken token = default) { throw new NotImplementedException(); }