package chart_variety

import (
	"hongze/hongze_yb/global"
)

// GetVarietyListByIdList
// @Description: 根据ID列表获取品种列表
// @author: Roc
// @datetime 2023-11-23 17:56:39
// @param idList []int
// @return items []*ChartVariety
// @return err error
func GetVarietyListByIdList(idList []int) (items []*ChartVariety, err error) {
	num := len(idList)
	if num <= 0 {
		return
	}
	sql := ` SELECT * FROM chart_variety WHERE 1 = 1 AND chart_variety_id in (?)`
	err = global.MYSQL["data"].Raw(sql, idList).Find(&items).Error

	return
}
