Files
Yi.Admin/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Integral/IntegralService.cs

36 lines
994 B
C#
Raw Normal View History

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