package cn.com.ctop.alarm.modules.service.impl;

import cn.com.ctop.alarm.modules.entity.RuleIndicator;
import cn.com.ctop.alarm.modules.mapper.RuleIndicatorMapper;
import cn.com.ctop.alarm.modules.service.IRuleIndicatorService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 规则指标信息
 *
 * @author jeecg-boot
 * @version V1.0
 * @date 2020-11-14
 */
@Service
public class RuleIndicatorServiceImpl extends ServiceImpl<RuleIndicatorMapper, RuleIndicator> implements IRuleIndicatorService {
    @Autowired
    private RuleIndicatorMapper ruleIndicatorMapper;

    @Override
    public String getRuleIndicatorNameByMediaTypeAndDimension(Integer mediaType, String dimension) {
        return ruleIndicatorMapper.getRuleIndicatorNameByMediaTypeAndDimension(mediaType, dimension);
    }

    @Override
    public String getDataTypeByRuleDimensionAndIndicatorCode(String ruleDimension, String indicatorCode) {
        return ruleIndicatorMapper.getDataTypeByRuleDimensionAndIndicatorCode(ruleDimension, indicatorCode);
    }
}
