package cn.cecep.talroad.service.impl.effective;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import cn.cecep.talroad.mapper.effective.MGovernanceTechnologyEstimateFactoryMapper;
import cn.cecep.talroad.domain.effective.MGovernanceTechnologyEstimateFactory;
import cn.cecep.talroad.service.effective.MGovernanceTechnologyEstimateFactoryService;
@Service
public class MGovernanceTechnologyEstimateFactoryServiceImpl extends ServiceImpl<MGovernanceTechnologyEstimateFactoryMapper, MGovernanceTechnologyEstimateFactory> implements MGovernanceTechnologyEstimateFactoryService{

    @Override
    public int updateBatch(List<MGovernanceTechnologyEstimateFactory> list) {
        return baseMapper.updateBatch(list);
    }
    @Override
    public int updateBatchSelective(List<MGovernanceTechnologyEstimateFactory> list) {
        return baseMapper.updateBatchSelective(list);
    }
    @Override
    public int batchInsert(List<MGovernanceTechnologyEstimateFactory> list) {
        return baseMapper.batchInsert(list);
    }

    @Override
    public List<String> selectNameByAnalyzeLatitude(Integer analyzeLatitude, String name,String value) {
        switch (analyzeLatitude){
            case 1:
                return baseMapper.selectNameByAnalyzeLatitude("m_governance_technology_estimate_factory",name,value);
            case 2:
                return baseMapper.selectNameByAnalyzeLatitude("m_governance_technology_estimate_facilities",name,value);
            case 3:
                return baseMapper.selectNameByAnalyzeLatitude("m_governance_technology_estimate_procedure",name,value);
            default:
                return new ArrayList<>() ;
        }
    }
}
