package yb_research_banner import "hongze/hongze_yb/global" func (item *YbResearchBanner) Create() (err error) { err = global.DEFAULT_MYSQL.Create(item).Error return } func (m *YbResearchBanner) Fetch(userId, bannerId int) (item *YbResearchBanner, err error) { err = global.DEFAULT_MYSQL.Model(m).Where("user_id = ? and banner_id= ?", userId, bannerId).First(&item).Error return }