feat: 新增签到功能
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user