宁波市生活垃圾分类志愿服务项目交流打分

This commit is contained in:
路 范
2025-10-17 13:26:24 +08:00
parent 0ad4e85834
commit 1eb4099af8
6 changed files with 372 additions and 4 deletions

View File

@@ -42,10 +42,12 @@ namespace Vote.Services.ApiController
/// <returns></returns>
[HttpPost]
[Microsoft.AspNetCore.Authorization.AllowAnonymous]
public async Task<dynamic> List()
public async Task<dynamic> List(ListInput args)
{
args ??= new ListInput();
var data = await repuserscore.AsQueryable()
.OrderBy(a => a.No)
.OrderByIF(!string.IsNullOrWhiteSpace(args.order), args.order)
.OrderByIF(string.IsNullOrWhiteSpace(args.order), a => a.No)
.ToListAsync();
// var data = await repuserscore20250801.DetachedEntities
// .OrderBy(a => a.No)

View File

@@ -23,4 +23,9 @@ public class UserScoreInput
{
public string expertId { get; set; }
public decimal? score { get; set; }
}
public class ListInput
{
public string order { get; set; }
}

View File

@@ -15,6 +15,7 @@ public class userscores20250801 : DEntityBase
this.Title = "";
this.Postion = "";
this.Name = "";
this.finalscore = 0;
}
/// <summary>

View File

@@ -302,7 +302,7 @@
项目
</summary>
</member>
<member name="M:Vote.Services.ApiController.UserScore20250801Service.List">
<member name="M:Vote.Services.ApiController.UserScore20250801Service.List(Vote.Services.Dto.ListInput)">
<summary>
列表
</summary>