feat: 新增签到功能

This commit is contained in:
橙子
2024-01-11 22:06:15 +08:00
parent 5a65a2e49f
commit c80ecf958c
10 changed files with 125 additions and 8 deletions

View File

@@ -3,18 +3,33 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Services;
using Volo.Abp.Users;
using Yi.Framework.Bbs.Domain.Managers;
namespace Yi.Framework.Bbs.Application.Services.Integral
{
public class IntegralService:ApplicationService
public class IntegralService : ApplicationService
{
private IntegralManager _integralManager;
public IntegralService(IntegralManager integralManager)
private ICurrentUser _currentUser;
public IntegralService(IntegralManager integralManager, ICurrentUser currentUser)
{
_integralManager= integralManager;
_integralManager = integralManager;
_currentUser = currentUser;
}
/// <summary>
/// 签到
/// </summary>
/// <returns></returns>
[Authorize]
public async Task<object> PostSignInAsync()
{
var value = await _integralManager.SignInAsync(_currentUser.Id ?? Guid.Empty);
return new { value };
}
}
}