package activity

import (
	"hongze/hongze_yb/models/tables/yb_activity_type"
	"log"
)

// GetTypeIdsByPid 根据类型ID获取所有子类id
func GetTypeIdsByPid(pid int) (typeIds []int, err error) {
	typeList, err := yb_activity_type.GetTypeByPid(pid)
	if err != nil {
		log.Print(err.Error())
		return
	}
	if typeList != nil {
		for _, item := range typeList{
			typeIds = append(typeIds, item.ActivityTypeID)
		}
	}
	return
}
