packagegroup_mimport("fmt""git.hilo.cn/hilo-common/mylogrus""git.hilo.cn/hilo-common/resource/mysql""hilo-group/myerr""time")typeGroupMicInLogstruct{mysql.EntityUserIdmysql.IDGroupIdmysql.Str}func(p*GroupMicInLog)TableName()string{month:=time.Now().Format("200601")returnfmt.Sprintf("group_mic_in_log_%s",month)}funcAddGroupMicInLog(userIdmysql.ID,groupIdmysql.Str)error{iferr:=mysql.Db.Table((&GroupMicInLog{}).TableName()).Create(&GroupMicInLog{Entity:mysql.Entity{},UserId:userId,GroupId:groupId,}).Error;err!=nil{mylogrus.MyLog.Errorf("GroupMicInLog save fail, err:%v",err)returnmyerr.WrapErr(err)}returnnil}