package com.ho.business.service.impl;

import com.ho.business.entity.Topology;
import com.ho.business.entity.TypeContrast;
import com.ho.business.mapper.TypeContrastMapper;
import com.ho.business.service.TypeContrastService;
import com.ho.common.tools.constant.CommonConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description 针对type_contrast表操作的实现
 * Author yule
 * Date 2022/9/3 10:23
 */
@Service
public class TypeContrastServiceImpl implements TypeContrastService {

    @Autowired
    private TypeContrastMapper typeContrastMapper;

    @Override
    public List<TypeContrast> selectStation() {
        List<TypeContrast> typeContrastList = typeContrastMapper.selectByCategory(CommonConstant.STATION_TYPE);
        return typeContrastList;
    }

    @Override
    public TypeContrast getTypeContract(Topology topology) {
        TypeContrast deviceType = typeContrastMapper.getDeviceTypeId(topology);
        return deviceType;
    }
}
