增加过滤参数

DataMaintenance
陈伟 2025-02-20 11:39:35 +08:00
parent 965c5bb197
commit c933ccd4c3
3 changed files with 7 additions and 0 deletions

View File

@ -11,6 +11,7 @@ using OpenAuth.App.ServiceApp.GoView.Response;
using OpenAuth.Repository;
using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Domain.GoView;
using Org.BouncyCastle.Ocsp;
using SqlSugar;
namespace OpenAuth.App.ServiceApp.GoView;
@ -81,6 +82,7 @@ public class GoViewProjectApp : SqlSugarBaseApp<GoviewProject, SugarDbContext>
{
RefAsync<int> total = 0;
var list = await Repository.AsQueryable()
.WhereIF(page.state != null,a=>a.State == page.state)
.ToPageListAsync(page.page, page.limit, total);
return new Response<PageInfo<List<GoviewProject>>>()
{

View File

@ -5,4 +5,8 @@ namespace OpenAuth.App.ServiceApp.GoView.Request;
public class GoViewProjectPage : PageReq
{
/// <summary>
/// -1 1
/// </summary>
public int? state { get; set; }
}

View File

@ -69,6 +69,7 @@ public class GoViewProjectController : ControllerBase
/// <summary>
/// 获取项目list集合
/// </summary>
///<param name="state"> -1 1</param>
/// <param name="page"></param>
/// <param name="limit"></param>
/// <returns></returns>