query.go 599 B

123456789101112131415
  1. package predict_edb_conf
  2. import "hongze/hongze_yb/global"
  3. // GetPredictEdbConfById 根据预测指标获取配置信息
  4. func GetPredictEdbConfById(edbInfoId int) (item *PredictEdbConf, err error) {
  5. err = global.MYSQL["data"].Where("predict_edb_info_id = ? ", edbInfoId).First(&item).Error
  6. return
  7. }
  8. // GetPredictEdbConfListById 根据预测指标id获取预测指标配置信息列表
  9. func GetPredictEdbConfListById(edbInfoId int) (items []*PredictEdbConf, err error) {
  10. err = global.MYSQL["data"].Where("predict_edb_info_id = ? ", edbInfoId).Order("config_id asc").Find(&items).Error
  11. return
  12. }