package com.steerinfo.baseinfo.meterbaserailwayhistaredetail.service.impl;

import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.mapper.MeterBaseRailwayHisTareDetailMapper;
import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail;
import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.service.IMeterBaseRailwayHisTareDetailService;
import com.steerinfo.framework.mapper.IBaseMapper;
import com.steerinfo.framework.service.impl.BaseServiceImpl;
import com.steerinfo.framework.service.pagehelper.PageHelper;
import com.steerinfo.framework.service.pagehelper.PageList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * MeterBaseRailwayHisTareDetail服务实现：
 * @author generator
 * @version 1.0-SNAPSHORT 2022-04-02 10:57
 * 类描述
 * 修订历史：
 * 日期：2022-04-02
 * 作者：generator
 * 参考：
 * 描述：MeterBaseRailwayHisTareDetail服务实现
 * @see null
 * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
 */
@Service(value = "meterBaseRailwayHisTareDetailService")
public class MeterBaseRailwayHisTareDetailServiceImpl extends BaseServiceImpl<MeterBaseRailwayHisTareDetail, String> implements IMeterBaseRailwayHisTareDetailService {

    @Autowired
    private MeterBaseRailwayHisTareDetailMapper meterBaseRailwayHisTareDetailMapper;

    @Override
    protected IBaseMapper<MeterBaseRailwayHisTareDetail, String> getMapper() {
        return meterBaseRailwayHisTareDetailMapper;
    }

    public PageList<MeterBaseRailwayHisTareDetail> listByDesc(Map<String, Object> parameters, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<MeterBaseRailwayHisTareDetail> rows = meterBaseRailwayHisTareDetailMapper.selectByParameter(parameters);
        PageList pageInfo = new PageList(rows);
        return pageInfo;
    }
}
