package com.ho.business.service.impl;

import com.ho.business.entity.ModelTypeCol;
import com.ho.business.mapper.ModelTypeColMapper;
import com.ho.business.service.ModelTypeColService;
import com.ho.business.vo.req.deviceModel.DeviceColSelectReqVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author gyan
 * @desc: model_type_col 实现类
 * @DateTime: 2023/3/8 13:52
 */
@Service
@Slf4j
public class ModelTypeColServiceImpl implements ModelTypeColService {

    @Autowired
    ModelTypeColMapper modelTypeColMapper;

    @Override
    public void addBatchModel(List<ModelTypeCol> modelTypeColTypeColList) {
        modelTypeColMapper.addBatchModel(modelTypeColTypeColList);
    }

    @Override
    public int updateByPrimaryKeySelective(ModelTypeCol modelTypeCol) {
       return modelTypeColMapper.updateByPrimaryKeySelective(modelTypeCol);
    }

    @Override
    public List<ModelTypeCol> selectByModelType(DeviceColSelectReqVo vo) {
        List<ModelTypeCol> list = modelTypeColMapper.selectByModelType(vo);
        return list;
    }

    @Override
    public List<ModelTypeCol> selectSameModelCol(String deviceType, List<String> collect) {
        List<ModelTypeCol> list = modelTypeColMapper.selectSameModelCol(deviceType,collect);
        return list;
    }

    @Override
    public List<ModelTypeCol> selectByIds(List<Integer> ids) {
        List<ModelTypeCol> list = modelTypeColMapper.selectByIds(ids);
        return list;
    }

    @Override
    public ModelTypeCol selectByCol(String col) {
        ModelTypeCol modelTypeCol = modelTypeColMapper.selectByCol(col);
        return modelTypeCol;
    }
    @Override
    public List<ModelTypeCol> selectByBatchCol(List<String> colList) {
        return  modelTypeColMapper.selectByColList(colList);
        }

    @Override
    public ModelTypeCol selectByCol(String col, String modelType) {
        return  modelTypeColMapper.selectByColValue(col,modelType);
    }

    @Override
    public ModelTypeCol selectById(Integer modelColId) {
        return  modelTypeColMapper.selectById(modelColId);
    }
}
