/// <summary> /// 为资讯添加标签时触发 /// </summary> private void AddTagsToCms_BatchAfter(IEnumerable<string> senders, TagEventArgs eventArgs) { if (eventArgs.TenantTypeId == TenantTypeIds.Instance().ContentItem()) { long cmsThreadId = eventArgs.ItemId; if (cmsSearcher == null) { cmsSearcher = (CmsSearcher)SearcherFactory.GetSearcher(CmsSearcher.CODE); } cmsSearcher.Update(contentItemService.Get(cmsThreadId)); } }
/// <summary> /// 为群组添加标签时触发 /// </summary> private void AddTagsToGroup_BatchAfter(IEnumerable<string> senders, TagEventArgs eventArgs) { if (eventArgs.TenantTypeId == TenantTypeIds.Instance().Group()) { long groupId = eventArgs.ItemId; if (groupSearcher == null) { groupSearcher = (GroupSearcher)SearcherFactory.GetSearcher(GroupSearcher.CODE); } groupSearcher.Update(groupService.Get(groupId)); } }
/// <summary> /// 为日志添加标签时触发 /// </summary> private void AddTagsToBar_BatchAfter(IEnumerable<string> senders, TagEventArgs eventArgs) { if (eventArgs.TenantTypeId == TenantTypeIds.Instance().BarThread()) { long barThreadId = eventArgs.ItemId; if (barSearcher == null) { barSearcher = (BarSearcher)SearcherFactory.GetSearcher(BarSearcher.CODE); } barSearcher.UpdateBarThread(barThreadService.Get(barThreadId)); } }
/// <summary> /// 为日志添加分类时触发 /// </summary> private void AddCategoriesToBlog_BatchAfter(IEnumerable<string> senders, TagEventArgs eventArgs) { if (eventArgs.TenantTypeId == TenantTypeIds.Instance().BlogThread()) { long blogThreadId = eventArgs.ItemId; if (blogSearcher == null) { blogSearcher = (BlogSearcher)SearcherFactory.GetSearcher(BlogSearcher.CODE); } blogSearcher.Update(blogService.Get(blogThreadId)); } }
/// <summary> /// 为日志添加标签时触发 /// </summary> private void AddTagsToBlog_BatchAfter(IEnumerable<string> senders, TagEventArgs eventArgs) { if (eventArgs.TenantTypeId == TenantTypeIds.Instance().Journals()) { long blogThreadId = eventArgs.ItemId; if (journalSearcher == null) { journalSearcher = (JournalSearcher)SearcherFactory.GetSearcher(JournalSearcher.CODE); } journalSearcher.Update(journalService.Get(blogThreadId)); } }
/// <summary> /// 为用户添加标签时触发 /// </summary> private void AddTagsToUser_BatchAfter(IEnumerable<string> senders, TagEventArgs eventArgs) { if (eventArgs.TenantTypeId == TenantTypeIds.Instance().User()) { long userId = eventArgs.ItemId; if (userSearcher == null) { userSearcher = (UserSearcher)SearcherFactory.GetSearcher(UserSearcher.CODE); } userSearcher.Update(userService.GetFullUser(userId)); } }
private void AddTag(string tagName, TagEventArgs eventArgs) { if (eventArgs.TenantTypeId == TenantTypeIds.Instance().User()) { long userId = eventArgs.ItemId; if (userSearcher == null) { userSearcher = (UserSearcher)SearcherFactory.GetSearcher(UserSearcher.CODE); } userSearcher.Update(userService.GetFullUser(userId)); } }