51 lines
1.4 KiB
C#
51 lines
1.4 KiB
C#
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using VOL.Business.IServices;
|
|
using VOL.Business.IServices.School;
|
|
using VOL.Business.Services.School;
|
|
using VOL.Core.Filters;
|
|
using VOL.Core.ManageUser;
|
|
using VOL.Core.Utilities;
|
|
using VOL.Model;
|
|
using VOL.Model.School.Request;
|
|
|
|
namespace VOL.WebApi.Controllers.Business
|
|
{
|
|
/// <summary>
|
|
/// 人脸识别
|
|
/// </summary>
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
[ApiExplorerSettings(GroupName = "v3")]
|
|
[TypeFilter(typeof(CustomApiResponseFilter))]
|
|
[AllowAnonymous]
|
|
public class FaceDetectController : ControllerBase
|
|
{
|
|
#region 初始化
|
|
|
|
private readonly IFaceDetectService _faceDetectService;
|
|
public FaceDetectController(
|
|
IFaceDetectService faceDetectService)
|
|
{
|
|
_faceDetectService = faceDetectService;
|
|
}
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// 学生人脸识别
|
|
/// </summary>
|
|
/// <param name="paramDto"></param>
|
|
/// <returns></returns>
|
|
[HttpPost(nameof(GetStudentDetails))]
|
|
public async Task<StudentPageListModel> GetStudentDetails(IFormFile file,int classId)
|
|
{
|
|
return await _faceDetectService.GetStudentDetails(file, classId);
|
|
}
|
|
}
|
|
}
|