|
@@ -22,6 +22,7 @@ using GxPress.Service.Interface.Visit;
|
|
|
using GxPress.Service.Interface.Analyze;
|
|
|
using GxPress.Repository.Interface.DepartmentUser;
|
|
|
using GxPress.EnumConst;
|
|
|
+using GxPress.Repository.Interface.Note;
|
|
|
|
|
|
namespace GxPress.Service.Implement.Topic
|
|
|
{
|
|
@@ -42,15 +43,15 @@ namespace GxPress.Service.Implement.Topic
|
|
|
private readonly INoteService _noteService;
|
|
|
private readonly IMiddleRepository _middleRepository;
|
|
|
private readonly IVisitRepository _visitRepository;
|
|
|
-
|
|
|
private readonly IVisitService _visitService;
|
|
|
+ private readonly INoteRepository noteRepository;
|
|
|
public TopicService(ITopicRepository topicRepository, IUserRepository userRepository,
|
|
|
ITopicAddresseeRepository topicAddresseeRepository,
|
|
|
ITopicGroupRepository topicGroupRepository,
|
|
|
ITopicGroupUserRepository topicGroupUserRepository, IAnalyzeService analyzeService,
|
|
|
ICommentRepository commentRepository, IMapper mapper, IDepartmentRepository departmentRepository,
|
|
|
IGroupUserRepository groupUserRepository, IFolderUserRepository folderUserRepository,
|
|
|
- INoteService noteService, IMiddleRepository middleRepository, IVisitRepository visitRepository, IVisitService visitService, IDepartmentUserRepository departmentUserRepository)
|
|
|
+ INoteService noteService, IMiddleRepository middleRepository, IVisitRepository visitRepository, IVisitService visitService, IDepartmentUserRepository departmentUserRepository, INoteRepository noteRepository)
|
|
|
{
|
|
|
_topicRepository = topicRepository;
|
|
|
_userRepository = userRepository;
|
|
@@ -68,6 +69,7 @@ namespace GxPress.Service.Implement.Topic
|
|
|
_visitRepository = visitRepository;
|
|
|
_visitService = visitService;
|
|
|
this.departmentUserRepository = departmentUserRepository;
|
|
|
+ this.noteRepository = noteRepository;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -587,6 +589,8 @@ namespace GxPress.Service.Implement.Topic
|
|
|
IsSystemDefault = true
|
|
|
});
|
|
|
}
|
|
|
+ result.IsDraft = await noteRepository.IsExistsDraftAsync(request.UserId, true);
|
|
|
+ result.DraftId = await noteRepository.GetNoteIdByDraftAsync(request.UserId, true);
|
|
|
return result;
|
|
|
}
|
|
|
/// <summary>
|