Browse Source

Merge pull request #8626 from abpframework/auto-merge/rel-4-3/302

Merge branch dev with rel-4.3
pull/8632/head
İlkay İlknur 5 years ago
committed by GitHub
parent
commit
2f4871d83e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogFeatureRepository.cs
  2. 8
      modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogPostRepository.cs
  3. 10
      modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs
  4. 4
      modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Ratings/MongoRatingRepository.cs
  5. 6
      modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Reactions/MongoUserReactionRepository.cs
  6. 4
      modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoEntityTagRepository.cs

4
modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogFeatureRepository.cs

@ -22,14 +22,14 @@ namespace Volo.CmsKit.MongoDB.Blogs
return base.FindAsync(x => x.BlogId == blogId && x.FeatureName == featureName); return base.FindAsync(x => x.BlogId == blogId && x.FeatureName == featureName);
} }
public async Task<List<BlogFeature>> GetListAsync(Guid blogId) public virtual async Task<List<BlogFeature>> GetListAsync(Guid blogId)
{ {
return await (await GetMongoQueryableAsync()) return await (await GetMongoQueryableAsync())
.Where(x => x.BlogId == blogId) .Where(x => x.BlogId == blogId)
.ToListAsync(); .ToListAsync();
} }
public async Task<List<BlogFeature>> GetListAsync(Guid blogId, List<string> featureNames) public virtual async Task<List<BlogFeature>> GetListAsync(Guid blogId, List<string> featureNames)
{ {
return await (await GetMongoQueryableAsync()) return await (await GetMongoQueryableAsync())
.Where(x => x.BlogId == blogId && featureNames.Contains(x.FeatureName)) .Where(x => x.BlogId == blogId && featureNames.Contains(x.FeatureName))

8
modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogPostRepository.cs

@ -22,7 +22,7 @@ namespace Volo.CmsKit.MongoDB.Blogs
{ {
} }
public async Task<BlogPost> GetBySlugAsync(Guid blogId, [NotNull] string slug, public virtual async Task<BlogPost> GetBySlugAsync(Guid blogId, [NotNull] string slug,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
Check.NotNullOrEmpty(slug, nameof(slug)); Check.NotNullOrEmpty(slug, nameof(slug));
@ -41,7 +41,7 @@ namespace Volo.CmsKit.MongoDB.Blogs
return blogPost; return blogPost;
} }
public async Task<int> GetCountAsync( public virtual async Task<int> GetCountAsync(
string filter = null, string filter = null,
Guid? blogId = null, Guid? blogId = null,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
@ -54,7 +54,7 @@ namespace Volo.CmsKit.MongoDB.Blogs
.CountAsync(GetCancellationToken(cancellationToken)); .CountAsync(GetCancellationToken(cancellationToken));
} }
public async Task<List<BlogPost>> GetListAsync( public virtual async Task<List<BlogPost>> GetListAsync(
string filter = null, string filter = null,
Guid? blogId = null, Guid? blogId = null,
int maxResultCount = int.MaxValue, int maxResultCount = int.MaxValue,
@ -92,7 +92,7 @@ namespace Volo.CmsKit.MongoDB.Blogs
}).ToList(); }).ToList();
} }
public async Task<bool> SlugExistsAsync(Guid blogId, [NotNull] string slug, public virtual async Task<bool> SlugExistsAsync(Guid blogId, [NotNull] string slug,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
Check.NotNullOrEmpty(slug, nameof(slug)); Check.NotNullOrEmpty(slug, nameof(slug));

10
modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs

@ -21,7 +21,7 @@ namespace Volo.CmsKit.MongoDB.Comments
{ {
} }
public async Task<CommentWithAuthorQueryResultItem> GetWithAuthorAsync(Guid id, CancellationToken cancellationToken = default) public virtual async Task<CommentWithAuthorQueryResultItem> GetWithAuthorAsync(Guid id, CancellationToken cancellationToken = default)
{ {
var dbContext = await GetDbContextAsync(); var dbContext = await GetDbContextAsync();
var commentQueryable = await GetMongoQueryableAsync(cancellationToken); var commentQueryable = await GetMongoQueryableAsync(cancellationToken);
@ -50,7 +50,7 @@ namespace Volo.CmsKit.MongoDB.Comments
}; };
} }
public async Task<List<CommentWithAuthorQueryResultItem>> GetListAsync( public virtual async Task<List<CommentWithAuthorQueryResultItem>> GetListAsync(
string filter = null, string filter = null,
string entityType = null, string entityType = null,
Guid? repliedCommentId = null, Guid? repliedCommentId = null,
@ -98,7 +98,7 @@ namespace Volo.CmsKit.MongoDB.Comments
}).ToList(); }).ToList();
} }
public async Task<long> GetCountAsync( public virtual async Task<long> GetCountAsync(
string text = null, string text = null,
string entityType = null, string entityType = null,
Guid? repliedCommentId = null, Guid? repliedCommentId = null,
@ -121,7 +121,7 @@ namespace Volo.CmsKit.MongoDB.Comments
.LongCountAsync(GetCancellationToken(cancellationToken)); .LongCountAsync(GetCancellationToken(cancellationToken));
} }
public async Task<List<CommentWithAuthorQueryResultItem>> GetListWithAuthorsAsync( public virtual async Task<List<CommentWithAuthorQueryResultItem>> GetListWithAuthorsAsync(
string entityType, string entityType,
string entityId, string entityId,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
@ -152,7 +152,7 @@ namespace Volo.CmsKit.MongoDB.Comments
}).ToList(); }).ToList();
} }
public async Task DeleteWithRepliesAsync( public virtual async Task DeleteWithRepliesAsync(
Comment comment, Comment comment,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {

4
modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Ratings/MongoRatingRepository.cs

@ -19,7 +19,7 @@ namespace Volo.CmsKit.MongoDB.Ratings
{ {
} }
public async Task<Rating> GetCurrentUserRatingAsync(string entityType, string entityId, Guid userId, public virtual async Task<Rating> GetCurrentUserRatingAsync(string entityType, string entityId, Guid userId,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
Check.NotNullOrWhiteSpace(entityType, nameof(entityType)); Check.NotNullOrWhiteSpace(entityType, nameof(entityType));
@ -32,7 +32,7 @@ namespace Volo.CmsKit.MongoDB.Ratings
return rating; return rating;
} }
public async Task<List<RatingWithStarCountQueryResultItem>> GetGroupedStarCountsAsync(string entityType, public virtual async Task<List<RatingWithStarCountQueryResultItem>> GetGroupedStarCountsAsync(string entityType,
string entityId, CancellationToken cancellationToken = default) string entityId, CancellationToken cancellationToken = default)
{ {
Check.NotNullOrWhiteSpace(entityType, nameof(entityType)); Check.NotNullOrWhiteSpace(entityType, nameof(entityType));

6
modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Reactions/MongoUserReactionRepository.cs

@ -18,7 +18,7 @@ namespace Volo.CmsKit.MongoDB.Reactions
{ {
} }
public async Task<UserReaction> FindAsync( public virtual async Task<UserReaction> FindAsync(
Guid userId, Guid userId,
string entityType, string entityType,
string entityId, string entityId,
@ -38,7 +38,7 @@ namespace Volo.CmsKit.MongoDB.Reactions
.FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); .FirstOrDefaultAsync(GetCancellationToken(cancellationToken));
} }
public async Task<List<UserReaction>> GetListForUserAsync( public virtual async Task<List<UserReaction>> GetListForUserAsync(
Guid userId, Guid userId,
string entityType, string entityType,
string entityId, string entityId,
@ -55,7 +55,7 @@ namespace Volo.CmsKit.MongoDB.Reactions
.ToListAsync(GetCancellationToken(cancellationToken)); .ToListAsync(GetCancellationToken(cancellationToken));
} }
public async Task<List<ReactionSummaryQueryResultItem>> GetSummariesAsync( public virtual async Task<List<ReactionSummaryQueryResultItem>> GetSummariesAsync(
string entityType, string entityType,
string entityId, string entityId,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)

4
modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoEntityTagRepository.cs

@ -18,7 +18,7 @@ namespace Volo.CmsKit.MongoDB.Tags
{ {
} }
public async Task DeleteManyAsync(Guid[] tagIds, CancellationToken cancellationToken = default) public virtual async Task DeleteManyAsync(Guid[] tagIds, CancellationToken cancellationToken = default)
{ {
var token = GetCancellationToken(cancellationToken); var token = GetCancellationToken(cancellationToken);
@ -26,7 +26,7 @@ namespace Volo.CmsKit.MongoDB.Tags
await collection.DeleteManyAsync(Builders<EntityTag>.Filter.In(x => x.TagId, tagIds), token); await collection.DeleteManyAsync(Builders<EntityTag>.Filter.In(x => x.TagId, tagIds), token);
} }
public Task<EntityTag> FindAsync( public virtual Task<EntityTag> FindAsync(
[NotNull] Guid tagId, [NotNull] Guid tagId,
[NotNull] string entityId, [NotNull] string entityId,
[CanBeNull] Guid? tenantId, [CanBeNull] Guid? tenantId,

Loading…
Cancel
Save