|
@@ -34,13 +34,13 @@ namespace GxPress.Service.Implement.Missive
|
|
|
private readonly IMiddleRepository _middleRepository;
|
|
|
private readonly IAnalyzeService _analyzeService;
|
|
|
private readonly IUserMiddleService _userMiddleService;
|
|
|
-
|
|
|
+ private readonly INoticeRepository noticeRepository;
|
|
|
private readonly IAddresseeRepository _addresseeRepository;
|
|
|
private readonly ICcRepository _ccRepository;
|
|
|
private readonly IContentJsonService _contentJsonService;
|
|
|
public MissiveService(IMissiveRepository missiveRepository,
|
|
|
IUserRepository userRepository,
|
|
|
- IMiddleService middleService, IMapper mapper, IMiddleRepository middleRepository, IAnalyzeService analyzeService, IUserMiddleService userMiddleService, IAddresseeRepository addresseeRepository, ICcRepository ccRepository, IContentJsonService contentJsonService)
|
|
|
+ IMiddleService middleService, IMapper mapper, IMiddleRepository middleRepository, IAnalyzeService analyzeService, IUserMiddleService userMiddleService, IAddresseeRepository addresseeRepository, ICcRepository ccRepository, IContentJsonService contentJsonService, INoticeRepository noticeRepository)
|
|
|
{
|
|
|
_missiveRepository = missiveRepository;
|
|
|
_userRepository = userRepository;
|
|
@@ -52,6 +52,7 @@ namespace GxPress.Service.Implement.Missive
|
|
|
_addresseeRepository = addresseeRepository;
|
|
|
_ccRepository = ccRepository;
|
|
|
_contentJsonService = contentJsonService;
|
|
|
+ this.noticeRepository = noticeRepository;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -407,7 +408,7 @@ namespace GxPress.Service.Implement.Missive
|
|
|
/// <returns></returns>
|
|
|
public async Task<List<MissiveInfo>> GetResult(List<MissiveInfo> missiveInfoResults, int missiveId, int userId)
|
|
|
{
|
|
|
- var missive = await _missiveRepository.GetAsync(missiveId);
|
|
|
+ var missive = await noticeRepository.GetAsync(missiveId);
|
|
|
if (missive == null)
|
|
|
{
|
|
|
throw new Common.Exceptions.BusinessException("站内信已删除");
|
|
@@ -422,10 +423,10 @@ namespace GxPress.Service.Implement.Missive
|
|
|
missiveInfoResult.IsRecall = true;
|
|
|
}
|
|
|
//获取新版
|
|
|
- missiveInfoResult.AddresseeUserMiddles = await _userMiddleService.FindUserMiddlesAsync(30, missiveId);
|
|
|
- missiveInfoResult.CcUserMiddles = await _userMiddleService.FindUserMiddlesAsync(40, missiveId);
|
|
|
+ missiveInfoResult.AddresseeUserMiddles = await _userMiddleService.FindUserMiddlesAsync(10, missiveId);
|
|
|
+ missiveInfoResult.CcUserMiddles = await _userMiddleService.FindUserMiddlesAsync(20, missiveId);
|
|
|
//获取当前站内信类型
|
|
|
- var middle = await _middleRepository.GetMiddleAsync(Q.Where(nameof(Entity.Middle.Middle.MiddleId), missiveId).Where(nameof(Entity.Middle.Middle.FolderType), 5));
|
|
|
+ var middle = await _middleRepository.GetMiddleAsync(Q.Where(nameof(Entity.Middle.Middle.MiddleId), missiveId).Where(nameof(Entity.Middle.Middle.FolderType), AllTypeConst.Notice.GetHashCode()));
|
|
|
if (middle != null)
|
|
|
//获取当前的站内信的类型 1 发送 2 草稿
|
|
|
missiveInfoResult.MissiveSendType = middle.NoticeAddresseeType.GetHashCode();
|