2016-09-07 11:11:34 +08:00
|
|
|
|
using System;
|
|
|
|
|
using OpenAuth.App.ViewModel;
|
|
|
|
|
using OpenAuth.Domain;
|
|
|
|
|
using OpenAuth.Domain.Interface;
|
|
|
|
|
|
|
|
|
|
namespace OpenAuth.App
|
|
|
|
|
{
|
|
|
|
|
public class WorkflowInboxApp
|
|
|
|
|
{
|
2016-09-07 16:58:08 +08:00
|
|
|
|
private IRepository<Relevance> _repository;
|
2016-09-07 11:11:34 +08:00
|
|
|
|
|
2016-09-07 16:58:08 +08:00
|
|
|
|
public WorkflowInboxApp(IRepository<Relevance> repository)
|
2016-09-07 11:11:34 +08:00
|
|
|
|
{
|
|
|
|
|
_repository = repository;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void DeleteAllByProcess(Guid processId)
|
|
|
|
|
{
|
2016-09-07 16:58:08 +08:00
|
|
|
|
_repository.Delete(u =>u.FirstId == processId && u.Key=="ProcessUser");
|
2016-09-07 11:11:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
2016-09-07 16:58:08 +08:00
|
|
|
|
public void Add(Relevance newInboxItem)
|
2016-09-07 11:11:34 +08:00
|
|
|
|
{
|
|
|
|
|
_repository.Add(newInboxItem);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|