package im_service import ( "errors" "hudongzhuanjia/libs/im" "hudongzhuanjia/models" ) func SendNoticeByActivityId(activityId int64, data map[string]interface{}, members ...string) error { live := new(models.LiveConfig) exist, err := live.GetByActivityId(activityId) if err != nil { return err } if !exist { return errors.New("直播信息不存在") } return im.SendGroupSystemNotification(live.ImGroupId, im.NoticeLiveRedPackStart, data, members...) }