Skip to content

Commit

Permalink
Merge pull request #195 from raffacabofrio/master
Browse files Browse the repository at this point in the history
 Corrige o bug no job 3 - remove vitrine.
  • Loading branch information
bhenn authored Jan 14, 2019
2 parents 561e2d4 + bc5ae35 commit c68c560
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ShareBook/ShareBook.Api/ViewModels/BooksVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public class BooksVM
public int TotalInterested { get; set; }
public string Status { get; set; }
public DateTime CreationDate { get; set; }
public DateTime ChooseDate { get; set; }
public DateTime? ChooseDate { get; set; }
}
}
2 changes: 1 addition & 1 deletion ShareBook/ShareBook.Service/Book/BookService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public override Result<Book> Update(Book entity)


//imagem eh opcional no update
if (entity.ImageName != "" && entity.ImageBytes.Length > 0)
if (!string.IsNullOrEmpty(entity.ImageName) && entity.ImageBytes.Length > 0)
{
entity.ImageSlug = ImageHelper.FormatImageName(entity.ImageName, entity.Slug);
_uploadService.UploadImage(entity.ImageBytes, entity.ImageSlug, "Books");
Expand Down
11 changes: 7 additions & 4 deletions ShareBook/Sharebook.Jobs/Executor/JobExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Sharebook.Jobs

public class JobExecutor : IJobExecutor
{
private readonly List<IJob> _jobs = new List<IJob>();
private readonly IList<IJob> _jobs;
private readonly IJobHistoryRepository _jobHistoryRepo;
private Stopwatch _stopwatch;

Expand All @@ -23,9 +23,12 @@ public JobExecutor(IJobHistoryRepository jobHistoryRepo,
{
_jobHistoryRepo = jobHistoryRepo;

_jobs.Add(job1);
_jobs.Add(job2);
_jobs.Add(job3);
_jobs = new List<IJob>
{
job1,
job2,
job3
};

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public override JobHistory Work()
else
{
book.ChooseDate = DateTime.Today.AddDays(10);
messages.Add(string.Format("Livro '{0}' vai ficar +10 dias na vitrine porque ainda não te interessados. :/", book.Title));
messages.Add(string.Format("Livro '{0}' vai ficar +10 dias na vitrine porque ainda não tem interessados. :/", book.Title));
SendEmail(book);
}

Expand Down

0 comments on commit c68c560

Please sign in to comment.