mirror of https://github.com/abpframework/abp.git
5 changed files with 48 additions and 5 deletions
@ -0,0 +1,8 @@ |
|||||
|
namespace Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents |
||||
|
{ |
||||
|
public class GetContentInput |
||||
|
{ |
||||
|
public string EntityType { get; set; } |
||||
|
public string EntityId { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -1,10 +1,10 @@ |
|||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
using Volo.CmsKit.Contents; |
using Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents; |
||||
|
|
||||
namespace Volo.CmsKit.Contents |
namespace Volo.CmsKit.Contents |
||||
{ |
{ |
||||
public interface IContentAppService |
public interface IContentAppService |
||||
{ |
{ |
||||
Task<ContentDto> GetAsync(string entityType, string entityId); |
Task<ContentDto> GetAsync(GetContentInput input); |
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,25 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents; |
||||
|
using Volo.CmsKit.Contents; |
||||
|
|
||||
|
namespace Volo.CmsKit.Controllers.Contents |
||||
|
{ |
||||
|
public class ContentController : CmsKitControllerBase, IContentAppService |
||||
|
{ |
||||
|
protected readonly IContentAppService _contentAppService; |
||||
|
|
||||
|
public ContentController(IContentAppService contentAppService) |
||||
|
{ |
||||
|
_contentAppService = contentAppService; |
||||
|
} |
||||
|
|
||||
|
public virtual Task<ContentDto> GetAsync(GetContentInput input) |
||||
|
{ |
||||
|
return _contentAppService.GetAsync(input); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue