using Entity.Ammeter;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Entity;
using Repository.Ammeter;
namespace Service.Ammeter
{
///
///
///
[Scope("SingleInstance")]
public class EmeterHourEnergyService: BaseServices
{
public EmeterHourEnergyService(EmeterHourEnergyRepository service)
{
this.BaseDal = service;
}
public async Task> Page(PageAmmeterReq queryPageModel)
{
QueryPageModel queryPageModel1 = new QueryPageModel
{
PageNum = 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));
}
}
}