|
@@ -71,8 +71,9 @@ public abstract class SnapshotApplicationBase
|
|
private readonly Publisher _publisher;
|
|
private readonly Publisher _publisher;
|
|
private readonly IGuiderInfoRepository _guiderInfoRepository;
|
|
private readonly IGuiderInfoRepository _guiderInfoRepository;
|
|
private readonly IFileDomainService _fileDomainService;
|
|
private readonly IFileDomainService _fileDomainService;
|
|
|
|
+ private readonly ICommunityInfoRepository _communityInfoRepository;
|
|
|
|
|
|
- public SnapshotApplicationBase(IThirdIdentiyService thirdLoginService, IRepository<Industry> industryRepository, ISnapshotBulletinRepository bulletinRepository, ISessionContext sessionContext, IRepository<RedPackRecord> redPackRecordRepository, IRepository<Order> orderRepository, IThirdAccountRepository thirdAccountRepository, IOrderSnapshotRepository orderSnapshotRepository, ISystemSettingCacheManager systemSettingCacheManager, ISystemAreaDomainService systemAreaDomainService, IFileRepository fileRepository, ISystemDicDataCacheManager systemDicDataCacheManager, ISnapshotOrderPublishRepository snapshotOrderPublishRepository, IRepository<WorkflowTrace> workflowTraceRepository, IPractitionerRepository practitionerRepository, IRepository<SystemArea> systemAreaRepository, IVolunteerRepository volunteerRepository, IVolunteerReportRepository volunteerReportRepository, ISystemLogRepository systemLog, IGuiderSystemService guiderSystemService, ICapPublisher capPublisher, Publisher publisher, IGuiderInfoRepository guiderInfoRepository, IFileDomainService fileDomainService)
|
|
|
|
|
|
+ public SnapshotApplicationBase(IThirdIdentiyService thirdLoginService, IRepository<Industry> industryRepository, ISnapshotBulletinRepository bulletinRepository, ISessionContext sessionContext, IRepository<RedPackRecord> redPackRecordRepository, IRepository<Order> orderRepository, IThirdAccountRepository thirdAccountRepository, IOrderSnapshotRepository orderSnapshotRepository, ISystemSettingCacheManager systemSettingCacheManager, ISystemAreaDomainService systemAreaDomainService, IFileRepository fileRepository, ISystemDicDataCacheManager systemDicDataCacheManager, ISnapshotOrderPublishRepository snapshotOrderPublishRepository, IRepository<WorkflowTrace> workflowTraceRepository, IPractitionerRepository practitionerRepository, IRepository<SystemArea> systemAreaRepository, IVolunteerRepository volunteerRepository, IVolunteerReportRepository volunteerReportRepository, ISystemLogRepository systemLog, IGuiderSystemService guiderSystemService, ICapPublisher capPublisher, Publisher publisher, IGuiderInfoRepository guiderInfoRepository, IFileDomainService fileDomainService, ICommunityInfoRepository communityInfoRepository)
|
|
{
|
|
{
|
|
_thirdLoginService = thirdLoginService;
|
|
_thirdLoginService = thirdLoginService;
|
|
_industryRepository = industryRepository;
|
|
_industryRepository = industryRepository;
|
|
@@ -98,6 +99,7 @@ public abstract class SnapshotApplicationBase
|
|
_publisher = publisher;
|
|
_publisher = publisher;
|
|
_guiderInfoRepository = guiderInfoRepository;
|
|
_guiderInfoRepository = guiderInfoRepository;
|
|
_fileDomainService = fileDomainService;
|
|
_fileDomainService = fileDomainService;
|
|
|
|
+ _communityInfoRepository = communityInfoRepository;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -224,9 +226,12 @@ public abstract class SnapshotApplicationBase
|
|
{
|
|
{
|
|
dto.ValidateObject();
|
|
dto.ValidateObject();
|
|
var items = await _snapshotOrderPublishRepository.Queryable()
|
|
var items = await _snapshotOrderPublishRepository.Queryable()
|
|
- .Where(m => m.IndustryId == dto.IndustryId)
|
|
|
|
- .WhereIF(dto.Keyword.NotNullOrEmpty(), m => m.No.Contains(dto.Keyword) || m.ArrangeTitle.Contains(dto.Keyword))
|
|
|
|
- .Select<OrderPublishOutDto>()
|
|
|
|
|
|
+ .LeftJoin<Order>((s, o) => s.Id == o.Id)
|
|
|
|
+ .Where((s, o) => s.IndustryId == dto.IndustryId)
|
|
|
|
+ .WhereIF(dto.Keyword.NotNullOrEmpty(), (s, o) => s.No.Contains(dto.Keyword) || s.ArrangeTitle.Contains(dto.Keyword))
|
|
|
|
+ .Select<OrderPublishOutDto>((s, o) => new OrderPublishOutDto {
|
|
|
|
+ Title = s.ArrangeTitle
|
|
|
|
+ }, true)
|
|
.ToFixedListAsync(dto, requestAborted);
|
|
.ToFixedListAsync(dto, requestAborted);
|
|
|
|
|
|
return items;
|
|
return items;
|
|
@@ -632,8 +637,14 @@ public abstract class SnapshotApplicationBase
|
|
/// <param name="entity"></param>
|
|
/// <param name="entity"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public async Task SyncCommunityInfoAsync(CommunityInfo entity, CancellationToken cancellationToken)
|
|
|
|
|
|
+ public async Task SyncCommunityInfoAsync(CommunityInfo community, CancellationToken cancellationToken)
|
|
{
|
|
{
|
|
|
|
+ var entity = await _communityInfoRepository.GetAsync(community.Id, cancellationToken);
|
|
|
|
+ if (entity == null)
|
|
|
|
+ {
|
|
|
|
+ community.UniqueKey = community.GetUniqueKey();
|
|
|
|
+ await _communityInfoRepository.AddAsync(community);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
#region 从业人员
|
|
#region 从业人员
|