package chart_tag

import (
	"hongze/hongze_yb/global"
)

// GetTagListByIdList
// @Description: 根据ID列表获取标签列表
// @author: Roc
// @datetime 2023-11-23 17:56:39
// @param idList []int
// @return items []*ChartTag
// @return err error
func GetTagListByIdList(idList []int) (items []*ChartTag, err error) {
	num := len(idList)
	if num <= 0 {
		return
	}

	sql := `SELECT * FROM chart_tag WHERE 1 = 1 AND chart_tag_id in (?)`
	err = global.MYSQL["data"].Raw(sql, idList).Find(&items).Error

	return
}
