后台数据表建立

This commit is contained in:
路 范
2022-03-30 19:34:37 +08:00
parent 904bdd16cd
commit 8a57806a29
37 changed files with 50474 additions and 431 deletions

View File

@@ -0,0 +1,41 @@
using Furion.DatabaseAccessor;
using Furion.DynamicApiController;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Vote.Services.Dto;
namespace Vote.Services.ApiController
{
/// <summary>
/// 项目
/// </summary>
[ApiDescriptionSettings("Vote", Order = 0)]
public class ProjectsService : IDynamicApiController
{
private readonly IRepository<Entities.Projects> rep_Projects;
public ProjectsService(IRepository<Entities.Projects> _rep_Projects)
{
rep_Projects = _rep_Projects;
}
/// <summary>
/// 列表
/// </summary>
/// <returns></returns>
[HttpPost]
[Microsoft.AspNetCore.Authorization.AllowAnonymous]
public async Task<dynamic> List()
{
var data = await rep_Projects.DetachedEntities.Where(p => !p.IsDeleted)
//.ProjectToType<ProjectsOutput>()
.OrderBy(a => a.serial_number)
.ToPagedListAsync();
return data;
}
}
}