You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
831 B

package service
import (
"github.com/IBM/sarama"
"github.com/TremblingV5/DouTok/applications/favorite/dal/query"
redishandle "github.com/TremblingV5/DouTok/pkg/redisHandle"
"github.com/TremblingV5/DouTok/pkg/safeMap"
"gorm.io/gorm"
)
var DB *gorm.DB
var DoFavorite query.IFavoriteDo
var DoFavoriteCnt query.IFavoriteCountDo
var Favorite = query.FavoriteStruct
var FavoriteCnt = query.FavoriteCountStruct
var RedisClients map[string]*redishandle.RedisClient
// 在内存中创建一个map用于存储视频的喜欢数
var FavCount *safeMap.SafeMap
var FavTotalCount *safeMap.SafeMap
// 达到一定喜欢数的视频的喜欢关系被存储在内存中
var FavRelationU2V *safeMap.SafeMap
var FavRelationV2U *safeMap.SafeMap
var FavCountKafkaProducer sarama.SyncProducer
var FavCountKafkaConsumer sarama.ConsumerGroup