package predict_edb_conf

import "hongze/hongze_yb/global"

// GetPredictEdbConfById 根据预测指标获取配置信息
func GetPredictEdbConfById(edbInfoId int) (item *PredictEdbConf, err error) {
	err = global.MYSQL["data"].Where("predict_edb_info_id = ? ", edbInfoId).First(&item).Error
	return
}

// GetPredictEdbConfListById 根据预测指标id获取预测指标配置信息列表
func GetPredictEdbConfListById(edbInfoId int) (items []*PredictEdbConf, err error) {
	err = global.MYSQL["data"].Where("predict_edb_info_id = ? ", edbInfoId).Order("config_id asc").Find(&items).Error
	return
}
