feat: 新增任务接口路由
This commit is contained in:
@@ -16,8 +16,8 @@ namespace Yi.Framework.Bbs.Domain.Managers;
|
||||
public class AssignmentManager : DomainService
|
||||
{
|
||||
private readonly IEnumerable<IAssignmentProvider> _assignmentProviders;
|
||||
private readonly ISqlSugarRepository<AssignmentAggregateRoot> _assignmentRepository;
|
||||
private readonly ISqlSugarRepository<AssignmentDefineAggregateRoot> _assignmentDefineRepository;
|
||||
public readonly ISqlSugarRepository<AssignmentAggregateRoot> _assignmentRepository;
|
||||
public readonly ISqlSugarRepository<AssignmentDefineAggregateRoot> _assignmentDefineRepository;
|
||||
private readonly ILocalEventBus _localEventBus;
|
||||
|
||||
public AssignmentManager(IEnumerable<IAssignmentProvider> assignmentProviders,
|
||||
@@ -92,7 +92,7 @@ public class AssignmentManager : DomainService
|
||||
}
|
||||
|
||||
output.DistinctBy(x => x.Id);
|
||||
throw new NotImplementedException();
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
@@ -134,6 +134,5 @@ public class AssignmentManager : DomainService
|
||||
{
|
||||
await _assignmentRepository._Db.Updateable(needUpdateEntities).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
using Yi.Framework.Bbs.Domain.Shared.Enums;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Yi.Framework.Bbs.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Bbs.Domain.Managers.AssignmentProviders;
|
||||
|
||||
/// <summary>
|
||||
/// 每日任务提供者
|
||||
/// </summary>
|
||||
[ExposeServices(typeof(IAssignmentProvider))]
|
||||
public class DailyProvider : TimerProvider
|
||||
{
|
||||
protected override AssignmentTypeEnum AssignmentType => AssignmentTypeEnum.Daily;
|
||||
|
||||
@@ -5,11 +5,12 @@ namespace Yi.Framework.Bbs.Domain.Managers.AssignmentProviders;
|
||||
/// <summary>
|
||||
/// 新手任务提供者
|
||||
/// </summary>
|
||||
public class NoviceProvider : IAssignmentProvider
|
||||
public class NoviceProvider : IAssignmentProvider
|
||||
{
|
||||
public Task<List<AssignmentDefineAggregateRoot>> GetCanReceiveListAsync(AssignmentContext context)
|
||||
public async Task<List<AssignmentDefineAggregateRoot>> GetCanReceiveListAsync(AssignmentContext context)
|
||||
{
|
||||
//新手任务是要有前置依赖关系的,链表类型依赖
|
||||
throw new NotImplementedException();
|
||||
throw new NotImplementedException();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
using Yi.Framework.Bbs.Domain.Shared.Enums;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Yi.Framework.Bbs.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Bbs.Domain.Managers.AssignmentProviders;
|
||||
|
||||
/// <summary>
|
||||
/// 每周任务提供者
|
||||
/// </summary>
|
||||
[ExposeServices(typeof(IAssignmentProvider))]
|
||||
public class WeeklyProvider : TimerProvider
|
||||
{
|
||||
protected override AssignmentTypeEnum AssignmentType => AssignmentTypeEnum.Weekly;
|
||||
|
||||
Reference in New Issue
Block a user