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