feat: 搭建任务框架
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Yi.Framework.Bbs.Domain.Entities.Assignment;
|
||||
|
||||
namespace Yi.Framework.Bbs.Domain.Managers.AssignmentProviders;
|
||||
|
||||
/// <summary>
|
||||
/// 任务提供者接口
|
||||
/// </summary>
|
||||
public interface IAssignmentProvider : ITransientDependency
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取可领取的任务定义,该方法需全部AssignmentProvider去重
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<AssignmentDefineAggregateRoot>> GetCanReceiveListAsync(AssignmentContext context);
|
||||
|
||||
/// <summary>
|
||||
/// 校验是否能够被领取,该方法还需工厂进行代理执行一次
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <returns></returns>
|
||||
Task VerifyCanAcceptAsync(AssignmentContext context);
|
||||
}
|
||||
Reference in New Issue
Block a user