宁波市生活垃圾分类志愿服务项目交流打分
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
@@ -15,6 +15,7 @@ public class userscores20250801 : DEntityBase
|
||||
this.Title = "";
|
||||
this.Postion = "";
|
||||
this.Name = "";
|
||||
this.finalscore = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user