feat:完成底部

This commit is contained in:
橙子
2023-03-24 22:39:35 +08:00
parent ab0d126c49
commit c83fcb7f26
17 changed files with 118 additions and 76 deletions

View File

@@ -94,6 +94,11 @@
Discuss输入创建对象
</summary>
</member>
<member name="P:Yi.BBS.Application.Contracts.Forum.Dtos.Discuss.DiscussGetListOutputDto.IsAgree">
<summary>
是否已点赞
</summary>
</member>
<member name="T:Yi.BBS.Application.Contracts.Forum.Dtos.MyTypeCreateInputVo">
<summary>
Label输入创建对象

View File

@@ -6,12 +6,12 @@ using System.Threading.Tasks;
namespace Yi.BBS.Application.Contracts.Exhibition.Dtos.Argee
{
public class ArgeeDto
public class AgreeDto
{
public ArgeeDto(bool isArgee)
public AgreeDto(bool isAgree)
{
IsArgee = isArgee;
if (isArgee)
IsAgree = isAgree;
if (isAgree)
{
Message = "点赞成功,点赞+1";
@@ -24,7 +24,7 @@ namespace Yi.BBS.Application.Contracts.Exhibition.Dtos.Argee
}
public bool IsArgee { get; set; }
public bool IsAgree { get; set; }
public string Message { get; set; }
}
}

View File

@@ -37,7 +37,7 @@ namespace Yi.BBS.Application.Exhibition
/// 点赞,返回true为点赞+1返回false为点赞-1
/// </summary>
/// <returns></returns>
public async Task<ArgeeDto> PostOperateAsync(long discussId)
public async Task<AgreeDto> PostOperateAsync(long discussId)
{
var entity = await _repository.GetFirstAsync(x => x.DiscussId == discussId && x.CreatorId == _currentUser.Id);
//判断是否已经点赞过
@@ -56,7 +56,7 @@ namespace Yi.BBS.Application.Exhibition
await _discssRepository.UpdateAsync(discussEntity);
uow.Commit();
}
return new ArgeeDto(true);
return new AgreeDto(true);
}
else
@@ -75,7 +75,7 @@ namespace Yi.BBS.Application.Exhibition
uow.Commit();
}
return new ArgeeDto(false);
return new AgreeDto(false);
}
}
}