package com.steerinfo.meterwork.meterworkoldandnew.service.impl;

import com.steerinfo.framework.datasource.DataSourceKey;
import com.steerinfo.framework.datasource.TargetDataSource;
import com.steerinfo.meterwork.meterworkoldandnew.mapper.MeterWorkOldAndNewMapper;
import com.steerinfo.meterwork.meterworkoldandnew.service.IMeterWorkOldAndNewService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

/**
 * @author Bourne.Cao
 * @date 2022-08-06 10:46
 */
@Service(value = "MeterWorkOldAndNewService")
public class MeterWorkOldAndNewService implements IMeterWorkOldAndNewService {

    @Resource
    private MeterWorkOldAndNewMapper meterWorkOldAndNewMapper;

    @Override
    public List<HashMap> getNewFirst(HashMap params) {
        return meterWorkOldAndNewMapper.doQueryFirstNew(params);
    }

    @Override
    @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
    public List<HashMap> getOldFirst(HashMap params) {
        return meterWorkOldAndNewMapper.doQueryFirstOld(params);
    }

    @Override
    public List<HashMap> getNew(HashMap params) {
        return meterWorkOldAndNewMapper.doQueryNew(params);
    }

    @Override
    @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
    public List<HashMap> getOld(HashMap params) {
        return meterWorkOldAndNewMapper.doQueryOld(params);
    }

    @Override
    public List<HashMap> countNew(HashMap params) {
        return meterWorkOldAndNewMapper.countNew(params);
    }

    @Override
    @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
    public List<HashMap> countOld(HashMap params) {
        return meterWorkOldAndNewMapper.countOld(params);
    }

    @Override
    public List<HashMap> getRailwayNew(HashMap params) {
        return meterWorkOldAndNewMapper.doQueryRailwayNew(params);
    }

    @Override
    @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
    public List<HashMap> getRailwayOld(HashMap params) {
        return meterWorkOldAndNewMapper.doQueryRailwayOld(params);
    }

    @Override
    public List<HashMap> getRailwayFirstNew(HashMap params) {
        return meterWorkOldAndNewMapper.doQueryRailwayFirstNew(params);
    }

    @Override
    @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
    public List<HashMap> getRailwayFirstOld(HashMap params) {
        return meterWorkOldAndNewMapper.doQueryRailwayFirstOld(params);
    }

    @Override
    public List<HashMap> countRailwayNew(HashMap params) {
        return meterWorkOldAndNewMapper.countRailwayNew(params);
    }

    @Override
    @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
    public List<HashMap> countRailwayOld(HashMap params) {
        return meterWorkOldAndNewMapper.countRailwayOld(params);
    }

    @Override
    public List<HashMap> getRailwayDynamicNew(HashMap params) {
        return meterWorkOldAndNewMapper.doQueryRailwayDynamicNew(params);
    }

    @Override
    @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
    public List<HashMap> getRailwayDynamicOld(HashMap params) {
        return meterWorkOldAndNewMapper.doQueryRailwayDynamicOld(params);
    }

    @Override
    public List<HashMap> getRailwayDynamicFirstNew(HashMap params) {
        return meterWorkOldAndNewMapper.doQueryRailwayDynamicFirstNew(params);
    }

    @Override
    @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
    public List<HashMap> getRailwayDynamicFirstOld(HashMap params) {
        return meterWorkOldAndNewMapper.doQueryRailwayDynamicFirstOld(params);
    }

    @Override
    public List<HashMap> countRailwayDynamicNew(HashMap params) {
        return meterWorkOldAndNewMapper.countRailwayDynamicNew(params);
    }

    @Override
    @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
    public List<HashMap> countRailwayDynamicOld(HashMap params) {
        return meterWorkOldAndNewMapper.countRailwayDynamicOld(params);
    }

    @Override
    public List<HashMap> getRailwayHookFirstNew(HashMap params) {
        return meterWorkOldAndNewMapper.doQueryRailwayHookFirstNew(params);
    }
    @Override
    @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
    public List<HashMap> getRailwayHookFirstOld(HashMap params) {
        return meterWorkOldAndNewMapper.doQueryRailwayHookFirstOld(params);
    }

    @Override
    public List<HashMap> getRailwayHookNew(HashMap params) {
        return meterWorkOldAndNewMapper.doQueryRailwayHookNew(params);
    }
    @Override
    @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
    public List<HashMap> getRailwayHookOld(HashMap params) {
        return meterWorkOldAndNewMapper.doQueryRailwayHookOld(params);
    }

    @Override
    public List<HashMap> countRailwayHookNew(HashMap params) {
        return meterWorkOldAndNewMapper.countRailwayHookNew(params);
    }
    @Override
    @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
    public List<HashMap> countRailwayHookOld(HashMap params) {
        return meterWorkOldAndNewMapper.countRailwayHookOld(params);
    }

    @Override
    public List<HashMap> getAllNew(HashMap params) {
        return meterWorkOldAndNewMapper.getAllNew(params);
    }

    @Override
    @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
    public List<HashMap> getAllOld(HashMap params) {
        return meterWorkOldAndNewMapper.getAllOld(params);
    }

    @Override
    public List<HashMap> getCountAllNew(HashMap params) {
        return meterWorkOldAndNewMapper.getCountAllNew(params);
    }

    @Override
    @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
    public List<HashMap> getCountAllOld(HashMap params) {
        return meterWorkOldAndNewMapper.getCountAllOld(params);
    }
}
