feat:完善discuss主题相关功能及界面
@@ -11,6 +11,7 @@
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\rbac\Yi.RBAC.Application.Contracts\Yi.RBAC.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Yi.BBS.Domain.Shared\Yi.BBS.Domain.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -64,6 +64,13 @@
|
||||
Discuss应用服务实现,用于参数效验、领域服务业务组合、日志记录、事务处理、账户信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.BBS.Application.Forum.DiscussService.GetAsync(System.Int64)">
|
||||
<summary>
|
||||
单查
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.BBS.Application.Forum.DiscussService.GetListAsync(Yi.BBS.Application.Contracts.Forum.Dtos.Discuss.DiscussGetListInputVo)">
|
||||
<summary>
|
||||
查询
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Domain.Shared.Forum.EnumClasses
|
||||
{
|
||||
public enum QueryDiscussTypeEnum
|
||||
{
|
||||
New,
|
||||
Suggest,
|
||||
Host
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Domain.Shared.Forum.Etos
|
||||
{
|
||||
public class SeeDiscussEventArgs
|
||||
{
|
||||
public long DiscussId { get; set; }
|
||||
public int OldSeeNum { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Cike.EventBus.EventHandlerAbstracts;
|
||||
using Yi.BBS.Domain.Forum.Entities;
|
||||
using Yi.BBS.Domain.Shared.Forum.Etos;
|
||||
using Yi.Framework.Ddd.Repositories;
|
||||
using Yi.RBAC.Domain.Shared.Identity.Etos;
|
||||
|
||||
namespace Yi.BBS.Domain.Forum.Event
|
||||
{
|
||||
public class SeeDiscussEventHandler : IDistributedEventHandler<SeeDiscussEventArgs>
|
||||
{
|
||||
private IRepository<DiscussEntity> _repository;
|
||||
public SeeDiscussEventHandler(IRepository<DiscussEntity> repository)
|
||||
{
|
||||
_repository = repository;
|
||||
}
|
||||
public async Task HandlerAsync(SeeDiscussEventArgs eventData)
|
||||
{
|
||||
var entity= await _repository.GetByIdAsync(eventData.DiscussId);
|
||||
if (entity is not null) {
|
||||
entity.SeeNum += 1;
|
||||
await _repository.UpdateAsync(entity);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 616 KiB |
|
After Width: | Height: | Size: 616 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 5.4 KiB |