using Entity.Ammeter;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Entity;
using Repository.Ammeter;
namespace Service.Ammeter
{
///
///
///
[Scope("SingleInstance")]
public class EmeterDayEnergyService : BaseServices
{
public EmeterDayEnergyService(EmeterDayEnergyRepository service)
{
this.BaseDal = service;
}
public async Task> Page(AmmeterQueryPageModel queryPageModel)
{
QueryPageModel queryPageModel1 = new QueryPageModel
{
Page = queryPageModel.Page,
PageSize = queryPageModel.PageSize,
};
if (!string.IsNullOrEmpty(queryPageModel.Code))
return PageResult.ConvertPage(this.BaseDal.QueryIPageByCause(queryPageModel1, u => u.Code == queryPageModel.Code));
else
return PageResult.ConvertPage(this.BaseDal.QueryIPageByCause(queryPageModel1, null));
}
}
}