YD_SmartSports.Api/VOL.AppManager/Services/App/Partial/App_TransactionAvgPriceService.cs

42 lines
1.4 KiB
C#
Raw Normal View History

2025-06-06 16:00:39 +08:00
/*
*App_TransactionAvgPrice类的业务代码应在此处编写
*使repository.EF/Dapper等信息
*使repository.DbContextBeginTransaction
*使DBServerProvider.
*使UserContext.Current操作
*App_TransactionAvgPriceService对增ServiceFunFilter
*/
using VOL.Core.BaseProvider;
using VOL.Core.Extensions.AutofacManager;
using VOL.Entity.DomainModels;
using System.Linq;
using VOL.Core.Extensions;
using System.Linq.Expressions;
using System;
namespace VOL.AppManager.Services
{
public partial class App_TransactionAvgPriceService
{
public override PageGridData<App_TransactionAvgPrice> GetPageData(PageDataOptions options)
{
SummaryExpress = (IQueryable<App_TransactionAvgPrice> queryable) =>
{
return queryable.GroupBy(x => 1).Select(x => new
{
AvgPrice = x.Average(o => o.AvgPrice),
Enable = x.Sum(o => o.Enable)
})
.FirstOrDefault();
};
return base.GetPageData(options);
}
protected override object GetDetailSummary<Detail>(IQueryable<Detail> queryeable)
{
return base.GetDetailSummary(queryeable);
}
}
}