49 lines
1.4 KiB
C#
49 lines
1.4 KiB
C#
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using YD_XinWei.Api.Services.Impl;
|
|
using YD_XinWei.Api.Services.Interface;
|
|
using YD_XinWei.Commons.Dto.Common;
|
|
using YD_XinWei.Commons.Dto.HomeWork;
|
|
using YD_XinWei.Commons.Dto.School;
|
|
|
|
namespace YD_XinWei.Api.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 芯未
|
|
/// </summary>
|
|
[ApiVersion("1.0")]
|
|
[Route("sports/{apiVersion}/common")]
|
|
[AllowAnonymous]
|
|
public class XinWeiController : ControllerBase
|
|
{
|
|
private readonly IXinWeiService _xinWeiService;
|
|
public XinWeiController(IXinWeiService xinWeiService)
|
|
{
|
|
_xinWeiService = xinWeiService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取项目模式列表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("getSportsModelTypeList")]
|
|
public async Task<List<ProjectModeDto>> GetSportsModelTypeList()
|
|
{
|
|
var res = await _xinWeiService.SportsModelTypeList();
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取体育项目列表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("getOrgSportsProjectList")]
|
|
public async Task<List<TestingProjectDto>> GetOrgSportsProjectList(int orgId)
|
|
{
|
|
var res = await _xinWeiService.OrgSportsProjectList(orgId);
|
|
return res;
|
|
}
|
|
}
|
|
}
|