24 lines
809 B
C#
24 lines
809 B
C#
using LFlow.Base.Interfaces;
|
|
using LFlow.Base.Utils;
|
|
using LFlow.OnlineManegement.Model;
|
|
using LFlow.OnlineManegement.Service;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace LFlow.OnlineManegement.Controller;
|
|
public class OnlineManagementController(IOnlineManagementService service) : BaseController
|
|
{
|
|
[HttpGet]
|
|
public PagedApiResult<List<OnlineDto>> ListAll(int pageIndex, int pageSize)
|
|
{
|
|
int dataTotal = 0;
|
|
var result = service.GetAllOnlineUser(pageIndex, pageSize, ref dataTotal);
|
|
return PagedApiResult<List<OnlineDto>>.SuccessResult(result, dataTotal, pageIndex, pageSize);
|
|
}
|
|
|
|
[HttpPost]
|
|
public ApiResult<OnlineDto> OnlineRegistered(OnlineDto onlineInfo)
|
|
{
|
|
return ApiResult<OnlineDto>.SuccessResult(service.OnlineRegistered(onlineInfo));
|
|
}
|
|
}
|