feat:完成底部
This commit is contained in:
@@ -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输入创建对象
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user