global feature attributes added and base types updated.

pull/8860/head
Ilkay Ilknur 4 years ago
parent f9ff98d43d
commit d91fcede09

@ -1,10 +1,11 @@
using System.Linq;
using System.Linq;
using System.Threading.Tasks;
using System.Threading.Tasks;
using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Tags;
namespace Volo.CmsKit.Admin.Tags
{
[RequiresGlobalFeature(typeof(TagsFeature))]
public class EntityTagAdminAppService : CmsKitAdminAppServiceBase, IEntityTagAdminAppService
{
protected ITagDefinitionStore TagDefinitionStore { get; }

@ -5,14 +5,15 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Permissions;
using Volo.CmsKit.Tags;
namespace Volo.CmsKit.Admin.Tags
{
[Authorize(CmsKitAdminPermissions.Tags.Default)]
[RequiresGlobalFeature(typeof(TagsFeature))]
public class TagAdminAppService : CmsKitAppServiceBase, ITagAdminAppService
{
protected ITagRepository Repository { get; }

@ -1,14 +1,14 @@
using JetBrains.Annotations;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.BlobStoring;
using Volo.Abp.Content;
using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Blogs;
using Volo.CmsKit.GlobalFeatures;
namespace Volo.CmsKit.Public.Blogs
{
[RequiresGlobalFeature(typeof(BlogsFeature))]
public class BlogPostPublicAppService : CmsKitPublicAppServiceBase, IBlogPostPublicAppService
{
protected IBlogRepository BlogRepository { get; }
@ -36,7 +36,7 @@ namespace Volo.CmsKit.Public.Blogs
{
var blog = await BlogRepository.GetBySlugAsync(blogSlug);
var blogPosts = await BlogPostRepository.GetListAsync(null, blog.Id,input.MaxResultCount, input.SkipCount, input.Sorting);
var blogPosts = await BlogPostRepository.GetListAsync(null, blog.Id, input.MaxResultCount, input.SkipCount, input.Sorting);
return new PagedResultDto<BlogPostPublicDto>(
await BlogPostRepository.GetCountAsync(blogId: blog.Id),

@ -1,22 +1,21 @@
using System;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.Options;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Authorization;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Uow;
using Volo.Abp.GlobalFeatures;
using Volo.Abp.Users;
using Volo.CmsKit.Comments;
using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Users;
namespace Volo.CmsKit.Public.Comments
{
public class CommentPublicAppService : ApplicationService, ICommentPublicAppService
[RequiresGlobalFeature(typeof(CommentsFeature))]
public class CommentPublicAppService : CmsKitPublicAppServiceBase, ICommentPublicAppService
{
protected ICommentRepository CommentRepository { get; }
protected ICmsUserLookupService CmsUserLookupService { get; }
@ -50,7 +49,7 @@ namespace Volo.CmsKit.Public.Comments
{
var user = await CmsUserLookupService.GetByIdAsync(CurrentUser.GetId());
if(input.RepliedCommentId.HasValue)
if (input.RepliedCommentId.HasValue)
{
await CommentRepository.GetAsync(input.RepliedCommentId.Value);
}
@ -111,8 +110,8 @@ namespace Volo.CmsKit.Public.Comments
//TODO: I think this method can be optimized if you use dictionaries instead of straight search
var parentComments = comments
.Where(c=> c.Comment.RepliedCommentId == null)
.Select(c=> ObjectMapper.Map<Comment, CommentWithDetailsDto>(c.Comment))
.Where(c => c.Comment.RepliedCommentId == null)
.Select(c => ObjectMapper.Map<Comment, CommentWithDetailsDto>(c.Comment))
.ToList();
foreach (var parentComment in parentComments)

@ -1,8 +1,11 @@
using System.Threading.Tasks;
using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Pages;
namespace Volo.CmsKit.Public.Pages
{
[RequiresGlobalFeature(typeof(PagesFeature))]
public class PagePublicAppService : CmsKitPublicAppServiceBase, IPagePublicAppService
{
protected IPageRepository PageRepository { get; }

@ -1,15 +1,17 @@
using System.Collections.Generic;
using Microsoft.AspNetCore.Authorization;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Services;
using Volo.Abp.Authorization;
using Volo.Abp.GlobalFeatures;
using Volo.Abp.Users;
using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Ratings;
using Volo.CmsKit.Users;
namespace Volo.CmsKit.Public.Ratings
{
public class RatingPublicAppService : ApplicationService, IRatingPublicAppService
[RequiresGlobalFeature(typeof(RatingsFeature))]
public class RatingPublicAppService : CmsKitPublicAppServiceBase, IRatingPublicAppService
{
protected IRatingRepository RatingRepository { get; }
public ICmsUserLookupService CmsUserLookupService { get; }

@ -1,13 +1,16 @@
using System.Collections.Generic;
using Microsoft.AspNetCore.Authorization;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos;
using Volo.Abp.GlobalFeatures;
using Volo.Abp.Users;
using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Reactions;
namespace Volo.CmsKit.Public.Reactions
{
[RequiresGlobalFeature(typeof(ReactionsFeature))]
public class ReactionPublicAppService : CmsKitPublicAppServiceBase, IReactionPublicAppService
{
protected IReactionDefinitionStore ReactionDefinitionStore { get; }

Loading…
Cancel
Save