Documentation ¶
Index ¶
- Constants
- func PromError(name string, format string, args ...interface{})
- type Dao
- func (d *Dao) ActLikeAchieves(c context.Context, id int64) (res *likemdl.Achievements, err error)
- func (d *Dao) ActMatch(c context.Context, sid int64) (res []*match.Match, err error)
- func (d *Dao) ActMatchCache(c context.Context, sid int64) (res []*match.Match, err error)
- func (d *Dao) ActMission(c context.Context, id int64, lid int64, mid int64) (res int64, err error)
- func (d *Dao) ActMissionFriends(c context.Context, id int64, lid int64) (res *likemdl.ActMissionGroups, err error)
- func (d *Dao) ActSubject(c context.Context, id int64) (res *likemdl.SubjectItem, err error)
- func (d *Dao) ActSubjectProtocol(c context.Context, id int64) (res *likemdl.ActSubjectProtocol, err error)
- func (d *Dao) ActUserAchieve(c context.Context, id int64) (res *likemdl.ActLikeUserAchievement, err error)
- func (d *Dao) ActUserAchieveChange(c context.Context, id, award int64) (upID int64, err error)
- func (d *Dao) AddActMission(c context.Context, act *l.ActMissionGroup) (actID int64, err error)
- func (d *Dao) AddCacheActLikeAchieves(c context.Context, id int64, val *likemdl.Achievements) (err error)
- func (d *Dao) AddCacheActMission(c context.Context, id int64, val int64, lid int64, mid int64) (err error)
- func (d *Dao) AddCacheActMissionFriends(c context.Context, id int64, val *likemdl.ActMissionGroups, lid int64) (err error)
- func (d *Dao) AddCacheActSubject(c context.Context, id int64, val *likemdl.SubjectItem) (err error)
- func (d *Dao) AddCacheActSubjectMaxID(c context.Context, val int64) (err error)
- func (d *Dao) AddCacheActSubjectProtocol(c context.Context, id int64, val *likemdl.ActSubjectProtocol) (err error)
- func (d *Dao) AddCacheActUserAchieve(c context.Context, id int64, val *likemdl.ActLikeUserAchievement) (err error)
- func (d *Dao) AddCacheActUserAward(c context.Context, id int64, val int64) (err error)
- func (d *Dao) AddCacheLike(c context.Context, id int64, val *likemdl.Item) (err error)
- func (dao *Dao) AddCacheLikeActs(c context.Context, sid, mid int64, values map[int64]int) (err error)
- func (d *Dao) AddCacheLikeContent(c context.Context, values map[int64]*likemdl.LikeContent) (err error)
- func (d *Dao) AddCacheLikeMaxID(c context.Context, val int64) (err error)
- func (d *Dao) AddCacheLikeMissionBuff(c context.Context, id int64, val int64, mid int64) (err error)
- func (d *Dao) AddCacheLikes(c context.Context, values map[int64]*likemdl.Item) (err error)
- func (d *Dao) AddCacheMatchSubjects(c context.Context, data map[int64]*match.Object) (err error)
- func (d *Dao) AddCacheMissionGroupItems(c context.Context, values map[int64]*likemdl.MissionGroup) (err error)
- func (d *Dao) AddCacheRedDotTs(c context.Context, mid, ts int64) (err error)
- func (d *Dao) AddCacheSourceItemData(c context.Context, id int64, val []int64) (err error)
- func (d *Dao) AddCacheSubjectStat(c context.Context, id int64, val *likemdl.SubjectStat) (err error)
- func (d *Dao) AddCacheViewRank(c context.Context, id int64, val string) (err error)
- func (dao *Dao) AddExtend(c context.Context, query string) (res int64, err error)
- func (d *Dao) AddFollow(c context.Context, mid int64, teams []string) (err error)
- func (d *Dao) AddGuess(c context.Context, mid, matID, objID, sid, result, stake int64) (lastID int64, err error)
- func (d *Dao) AddLotteryTimes(c context.Context, sid, mid int64) (err error)
- func (d *Dao) AddUserAchievment(c context.Context, userAchi *l.ActLikeUserAchievement) (ID int64, err error)
- func (dao *Dao) CVoteLog(c context.Context, sid int64, aid int64, mid int64, stage int64, vote int64)
- func (d *Dao) CacheActLikeAchieves(c context.Context, id int64) (res *likemdl.Achievements, err error)
- func (d *Dao) CacheActMission(c context.Context, id int64, lid int64, mid int64) (res int64, err error)
- func (d *Dao) CacheActMissionFriends(c context.Context, id int64, lid int64) (res *likemdl.ActMissionGroups, err error)
- func (d *Dao) CacheActSubject(c context.Context, id int64) (res *likemdl.SubjectItem, err error)
- func (d *Dao) CacheActSubjectMaxID(c context.Context) (res int64, err error)
- func (d *Dao) CacheActSubjectProtocol(c context.Context, id int64) (res *likemdl.ActSubjectProtocol, err error)
- func (d *Dao) CacheActUserAchieve(c context.Context, id int64) (res *likemdl.ActLikeUserAchievement, err error)
- func (d *Dao) CacheActUserAward(c context.Context, id int64) (res int64, err error)
- func (d *Dao) CacheLike(c context.Context, id int64) (res *likemdl.Item, err error)
- func (dao *Dao) CacheLikeActs(c context.Context, sid, mid int64, lids []int64) (res map[int64]int, err error)
- func (d *Dao) CacheLikeContent(c context.Context, ids []int64) (res map[int64]*likemdl.LikeContent, err error)
- func (d *Dao) CacheLikeMaxID(c context.Context) (res int64, err error)
- func (d *Dao) CacheLikeMissionBuff(c context.Context, id int64, mid int64) (res int64, err error)
- func (d *Dao) CacheLikes(c context.Context, ids []int64) (res map[int64]*likemdl.Item, err error)
- func (d *Dao) CacheMatchSubjects(c context.Context, ids []int64) (res map[int64]*match.Object, err error)
- func (d *Dao) CacheMissionGroupItems(c context.Context, ids []int64) (res map[int64]*likemdl.MissionGroup, err error)
- func (d *Dao) CacheRedDotTs(c context.Context, mid int64) (ts int64, err error)
- func (d *Dao) CacheSourceItemData(c context.Context, id int64) (res []int64, err error)
- func (d *Dao) CacheSubjectStat(c context.Context, id int64) (res *likemdl.SubjectStat, err error)
- func (d *Dao) CacheViewRank(c context.Context, id int64) (res string, err error)
- func (dao *Dao) Close()
- func (d *Dao) DelActMatchCache(c context.Context, sid, matID int64) (err error)
- func (d *Dao) DelCacheActMissionFriends(c context.Context, id int64, lid int64) (err error)
- func (dao *Dao) DelLikeListCtime(c context.Context, sid int64, items []*like.Item) (err error)
- func (d *Dao) DelObjectCache(c context.Context, objID, sid int64) (err error)
- func (d *Dao) DelUserLogCache(c context.Context, sid, mid int64) (err error)
- func (d *Dao) Follow(c context.Context, mid int64) (res []string, err error)
- func (dao *Dao) GroupItemData(c context.Context, sid int64, ck string) (data []*like.GroupItem, err error)
- func (dao *Dao) IPReqquestCheck(c context.Context, ip string) (val int, err error)
- func (dao *Dao) Incr(c context.Context, key string) (res bool, err error)
- func (dao *Dao) IncrStoryEachLikeAct(c context.Context, sid, mid, lid int64, score int64) (res int64, err error)
- func (dao *Dao) IncrStoryLikeSum(c context.Context, sid, mid int64, score int64) (res int64, err error)
- func (dao *Dao) Incrby(c context.Context, key string) (res bool, err error)
- func (dao *Dao) InfoCache(c context.Context, sid int64) (v *like.Subject, err error)
- func (d *Dao) InrcMissionLikeLimit(c context.Context, sid, mid int64, val int64) (res bool, err error)
- func (d *Dao) Like(c context.Context, id int64) (res *likemdl.Item, err error)
- func (dao *Dao) LikeActAdd(c context.Context, likeAct *l.Action) (id int64, err error)
- func (dao *Dao) LikeActInfos(c context.Context, lids []int64, mid int64) (likeActs map[int64]*l.Action, err error)
- func (dao *Dao) LikeActLidCounts(c context.Context, lids []int64) (res map[int64]int64, err error)
- func (dao *Dao) LikeActSums(c context.Context, sid int64, lids []int64) (res []*l.LidLikeSum, err error)
- func (dao *Dao) LikeActZscore(c context.Context, sid, lid int64) (res int64, err error)
- func (dao *Dao) LikeActs(c context.Context, sid, mid int64, lids []int64) (res map[int64]int, err error)
- func (d *Dao) LikeContent(c context.Context, keys []int64) (res map[int64]*likemdl.LikeContent, err error)
- func (dao *Dao) LikeCount(c context.Context, sid int64) (res int64, err error)
- func (dao *Dao) LikeCtime(c context.Context, sid int64, start, end int) (res []int64, err error)
- func (dao *Dao) LikeList(c context.Context, sid int64) (ns []*like.Item, err error)
- func (dao *Dao) LikeListCtime(c context.Context, sid int64, items []*like.Item) (err error)
- func (dao *Dao) LikeListMoreLid(c context.Context, lid int64) (res []*like.Item, err error)
- func (dao *Dao) LikeMaxID(c context.Context) (res *like.Item, err error)
- func (d *Dao) LikeMissionBuff(c context.Context, id int64, mid int64) (res int64, err error)
- func (dao *Dao) LikeRandom(c context.Context, sid int64, start, end int) (res []int64, err error)
- func (dao *Dao) LikeRandomCount(c context.Context, sid int64) (res int64, err error)
- func (dao *Dao) LikeRegionCache(c context.Context, sid int64, regionID int16, start, end int) (likes []*like.Item, err error)
- func (dao *Dao) LikeRegionCnt(c context.Context, sid int64, regionID int16) (count int, err error)
- func (dao *Dao) LikeTagCache(c context.Context, sid, tagID int64, start, end int) (likes []*like.Item, err error)
- func (dao *Dao) LikeTagCnt(c context.Context, sid, tagID int64) (count int, err error)
- func (dao *Dao) LikeTypeList(c context.Context, sid int64) (ns []*like.Like, err error)
- func (d *Dao) Likes(c context.Context, keys []int64) (res map[int64]*likemdl.Item, err error)
- func (dao *Dao) LikesBySid(c context.Context, lid, sid int64) (res []*like.Item, err error)
- func (dao *Dao) ListFromES(c context.Context, sid int64, order string, ps, pn int, seed int64) (res *like.ListInfo, err error)
- func (d *Dao) ListGuess(c context.Context, sid, mid int64) (res []*match.UserLog, err error)
- func (d *Dao) LotteryIndex(c context.Context, actID, platform, source, mid int64) (res *l.Lottery, err error)
- func (d *Dao) Match(c context.Context, id int64) (res *match.Match, err error)
- func (d *Dao) MatchCache(c context.Context, id int64) (mat *match.Match, err error)
- func (d *Dao) MatchSubjects(c context.Context, keys []int64) (res map[int64]*likemdl.Object, err error)
- func (d *Dao) MissionGroupAdd(c context.Context, group *l.MissionGroup) (misID int64, err error)
- func (d *Dao) MissionGroupItems(c context.Context, keys []int64) (res map[int64]*likemdl.MissionGroup, err error)
- func (d *Dao) MissionLidRank(c context.Context, sid, lid int64) (rank int64, err error)
- func (d *Dao) MissionLidScore(c context.Context, sid, lid int64) (score int64, err error)
- func (d *Dao) MissionLikeLimit(c context.Context, sid, mid int64) (res int64, err error)
- func (d *Dao) MissionScoreList(c context.Context, sid int64, start, end int) (data []int64, err error)
- func (dao *Dao) MultiTags(c context.Context, wids []int64) (tagList map[int64][]string, err error)
- func (dao *Dao) NewestSubject(c context.Context, typeIDs []int64) (res *like.SubItem, err error)
- func (d *Dao) Object(c context.Context, id int64) (res *match.Object, err error)
- func (d *Dao) ObjectCache(c context.Context, id int64) (mat *match.Object, err error)
- func (d *Dao) ObjectsCache(c context.Context, sid int64, start, end int) (res []*match.Object, total int, err error)
- func (d *Dao) ObjectsUnStart(c context.Context, sid int64) (res []*match.Object, err error)
- func (dao *Dao) OidInfoFromES(c context.Context, oids []int64, sType int) (res map[int64]*like.Item, err error)
- func (dao *Dao) Ping(c context.Context) error
- func (d *Dao) RawActLikeAchieves(c context.Context, sid int64) (res *likemdl.Achievements, err error)
- func (d *Dao) RawActMission(c context.Context, sid, lid, mid int64) (res int64, err error)
- func (d *Dao) RawActMissionFriends(c context.Context, sid, lid int64) (res *l.ActMissionGroups, err error)
- func (dao *Dao) RawActSubject(c context.Context, id int64) (res *like.SubjectItem, err error)
- func (dao *Dao) RawActSubjectProtocol(c context.Context, sid int64) (res *lmdl.ActSubjectProtocol, err error)
- func (d *Dao) RawActUserAchieve(c context.Context, id int64) (res *l.ActLikeUserAchievement, err error)
- func (dao *Dao) RawLike(c context.Context, id int64) (res *like.Item, err error)
- func (dao *Dao) RawLikeContent(c context.Context, ids []int64) (res map[int64]*l.LikeContent, err error)
- func (d *Dao) RawLikeMissionBuff(c context.Context, sid, mid int64) (ID int64, err error)
- func (dao *Dao) RawLikes(c context.Context, ids []int64) (data map[int64]*like.Item, err error)
- func (d *Dao) RawMatchSubjects(c context.Context, ids []int64) (res map[int64]*match.Object, err error)
- func (d *Dao) RawMissionGroupItems(c context.Context, lids []int64) (res map[int64]*l.MissionGroup, err error)
- func (dao *Dao) RawSourceItemData(c context.Context, sid int64) (sids []int64, err error)
- func (dao *Dao) Rb(c context.Context, key string) (res []byte, err error)
- func (dao *Dao) RedisCache(c context.Context, sid int64, start, end int) (res []*l.LidLikeRes, err error)
- func (dao *Dao) RsGet(c context.Context, key string) (res string, err error)
- func (dao *Dao) RsSet(c context.Context, key string, value string) (ok bool, err error)
- func (dao *Dao) RsSetNX(c context.Context, key string) (res bool, err error)
- func (d *Dao) SetActMatchCache(c context.Context, sid int64, matchs []*match.Match) (err error)
- func (dao *Dao) SetEachLikeSum(c context.Context, sid, mid, lid int64, sum int64) (err error)
- func (dao *Dao) SetIPRequest(c context.Context, ip string) (err error)
- func (dao *Dao) SetInfoCache(c context.Context, v *like.Subject, sid int64) (err error)
- func (dao *Dao) SetInitializeLikeCache(c context.Context, sid int64, lidLikeAct map[int64]int64, ...) (err error)
- func (dao *Dao) SetLikeRandom(c context.Context, sid int64, ids []int64) (err error)
- func (dao *Dao) SetLikeRegionCache(c context.Context, sid int64, regionID int16, likes []*like.Item) (err error)
- func (dao *Dao) SetLikeSum(c context.Context, sid, mid int64, sum int64) (err error)
- func (dao *Dao) SetLikeTagCache(c context.Context, sid, tagID int64, likes []*like.Item) (err error)
- func (d *Dao) SetMatchCache(c context.Context, id int64, mat *match.Match) (err error)
- func (d *Dao) SetMissionTop(c context.Context, sid, lid int64, score int64, ctime int64) (count int64, err error)
- func (d *Dao) SetObjectCache(c context.Context, id int64, object *match.Object) (err error)
- func (d *Dao) SetObjectsCache(c context.Context, sid int64, objects []*match.Object, total int) (err error)
- func (dao *Dao) SetRedisCache(c context.Context, sid, lid, score int64, likeType int) (err error)
- func (dao *Dao) SetTagLikeCountsCache(c context.Context, sid int64, counts map[int64]int32) (err error)
- func (d *Dao) SetUserLogCache(c context.Context, sid, mid int64, userLogs []*match.UserLog) (err error)
- func (dao *Dao) SourceItem(c context.Context, sid int64) (source json.RawMessage, err error)
- func (d *Dao) SourceItemData(c context.Context, id int64) (res []int64, err error)
- func (dao *Dao) StoryEachLikeAct(c context.Context, sid, mid, lid int64, stime, etime string) (res int64, err error)
- func (dao *Dao) StoryEachLikeSum(c context.Context, sid, mid, lid int64) (res int64, err error)
- func (dao *Dao) StoryLikeActSum(c context.Context, sid, mid int64, stime, etime string) (res int64, err error)
- func (dao *Dao) StoryLikeSum(c context.Context, sid, mid int64) (res int64, err error)
- func (dao *Dao) Subject(c context.Context, sid int64) (n *like.Subject, err error)
- func (dao *Dao) SubjectListMoreSid(c context.Context, minSid int64) (res []*like.SubjectItem, err error)
- func (dao *Dao) SubjectMaxID(c context.Context) (res *like.SubjectItem, err error)
- func (dao *Dao) TagLikeCountsCache(c context.Context, sid int64, tagIDs []int64) (counts map[int64]int32, err error)
- func (d *Dao) UserAchievement(c context.Context, sid, mid int64) (res []*l.ActLikeUserAchievement, err error)
- func (d *Dao) UserLogCache(c context.Context, sid, mid int64) (res []*match.UserLog, err error)
- func (dao *Dao) VoteLog(c context.Context, sid int64, aid int64, mid int64, stage int64, vote int64) (rows int64, err error)
Constants ¶
const ( HasLike = 1 NoLike = -1 )
like_action sql and like state
const ( // EsOrderLikes archive center likes. EsOrderLikes = "likes" // EsOrderCoin archive center coin . EsOrderCoin = "coin" // EsOrderReply archive center reply. EsOrderReply = "reply" EsOrderShare = "share" // EsOrderClick archive center click EsOrderClick = "click" // EsOrderDm archive center dm EsOrderDm = "dm" // EsOrderFav archive center fav EsOrderFav = "fav" // ActOrderLike activity list like order. ActOrderLike = "like" // ActOrderCtime activity list ctime order. ActOrderCtime = "ctime" // ActOrderRandom order random . ActOrderRandom = "random" )
const ( // AwardNotChange . AwardNotChange = 0 // AwardHasChange . AwardHasChange = 1 // AwardNoGet . AwardNoGet = 2 )
const (
// HaveAward award state
HaveAward = 1
)
const (
// MissionStateInit the init state
MissionStateInit = 0
)
const (
//SubjectValidState act_subject valid state
SubjectValidState = 1
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao struct
func (*Dao) ActLikeAchieves ¶
ActLikeAchieves get data from cache if miss will call source method, then add to cache.
func (*Dao) ActMatchCache ¶
ActMatchCache get match list from cache.
func (*Dao) ActMission ¶
ActMission get data from cache if miss will call source method, then add to cache.
func (*Dao) ActMissionFriends ¶
func (d *Dao) ActMissionFriends(c context.Context, id int64, lid int64) (res *likemdl.ActMissionGroups, err error)
ActMissionFriends get data from cache if miss will call source method, then add to cache.
func (*Dao) ActSubject ¶
ActSubject get data from cache if miss will call source method, then add to cache.
func (*Dao) ActSubjectProtocol ¶
func (d *Dao) ActSubjectProtocol(c context.Context, id int64) (res *likemdl.ActSubjectProtocol, err error)
ActSubjectProtocol get data from cache if miss will call source method, then add to cache.
func (*Dao) ActUserAchieve ¶
func (d *Dao) ActUserAchieve(c context.Context, id int64) (res *likemdl.ActLikeUserAchievement, err error)
ActUserAchieve get data from cache if miss will call source method, then add to cache.
func (*Dao) ActUserAchieveChange ¶
ActUserAchieveChange .
func (*Dao) AddActMission ¶
AddActMission .
func (*Dao) AddCacheActLikeAchieves ¶
func (d *Dao) AddCacheActLikeAchieves(c context.Context, id int64, val *likemdl.Achievements) (err error)
AddCacheActLikeAchieves Set data to mc
func (*Dao) AddCacheActMission ¶
func (d *Dao) AddCacheActMission(c context.Context, id int64, val int64, lid int64, mid int64) (err error)
AddCacheActMission Set data to mc
func (*Dao) AddCacheActMissionFriends ¶
func (d *Dao) AddCacheActMissionFriends(c context.Context, id int64, val *likemdl.ActMissionGroups, lid int64) (err error)
AddCacheActMissionFriends Set data to mc
func (*Dao) AddCacheActSubject ¶
AddCacheActSubject Set data to mc
func (*Dao) AddCacheActSubjectMaxID ¶
AddCacheActSubjectMaxID Set data to mc
func (*Dao) AddCacheActSubjectProtocol ¶
func (d *Dao) AddCacheActSubjectProtocol(c context.Context, id int64, val *likemdl.ActSubjectProtocol) (err error)
AddCacheActSubjectProtocol Set data to mc
func (*Dao) AddCacheActUserAchieve ¶
func (d *Dao) AddCacheActUserAchieve(c context.Context, id int64, val *likemdl.ActLikeUserAchievement) (err error)
AddCacheActUserAchieve Set data to mc
func (*Dao) AddCacheActUserAward ¶
AddCacheActUserAward Set data to mc
func (*Dao) AddCacheLike ¶
AddCacheLike Set data to mc
func (*Dao) AddCacheLikeActs ¶
func (dao *Dao) AddCacheLikeActs(c context.Context, sid, mid int64, values map[int64]int) (err error)
AddCacheLikeActs Set data to mc
func (*Dao) AddCacheLikeContent ¶
func (d *Dao) AddCacheLikeContent(c context.Context, values map[int64]*likemdl.LikeContent) (err error)
AddCacheLikeContent Set data to mc
func (*Dao) AddCacheLikeMaxID ¶
AddCacheLikeMaxID Set data to mc
func (*Dao) AddCacheLikeMissionBuff ¶
func (d *Dao) AddCacheLikeMissionBuff(c context.Context, id int64, val int64, mid int64) (err error)
AddCacheLikeMissionBuff Set data to mc
func (*Dao) AddCacheLikes ¶
AddCacheLikes Set data to mc
func (*Dao) AddCacheMatchSubjects ¶
AddCacheMatchSubjects .
func (*Dao) AddCacheMissionGroupItems ¶
func (d *Dao) AddCacheMissionGroupItems(c context.Context, values map[int64]*likemdl.MissionGroup) (err error)
AddCacheMissionGroupItems Set data to mc
func (*Dao) AddCacheRedDotTs ¶
AddCacheRedDotTs .
func (*Dao) AddCacheSourceItemData ¶
AddCacheSourceItemData Set data to mc
func (*Dao) AddCacheSubjectStat ¶
func (d *Dao) AddCacheSubjectStat(c context.Context, id int64, val *likemdl.SubjectStat) (err error)
AddCacheSubjectStat Set data to mc
func (*Dao) AddCacheViewRank ¶
AddCacheViewRank Set data to mc
func (*Dao) AddGuess ¶
func (d *Dao) AddGuess(c context.Context, mid, matID, objID, sid, result, stake int64) (lastID int64, err error)
AddGuess add match user log
func (*Dao) AddLotteryTimes ¶
AddLotteryTimes .
func (*Dao) AddUserAchievment ¶
func (d *Dao) AddUserAchievment(c context.Context, userAchi *l.ActLikeUserAchievement) (ID int64, err error)
AddUserAchievment .
func (*Dao) CVoteLog ¶
func (dao *Dao) CVoteLog(c context.Context, sid int64, aid int64, mid int64, stage int64, vote int64)
CVoteLog chan Vote Log
func (*Dao) CacheActLikeAchieves ¶
func (d *Dao) CacheActLikeAchieves(c context.Context, id int64) (res *likemdl.Achievements, err error)
CacheActLikeAchieves get data from mc
func (*Dao) CacheActMission ¶
func (d *Dao) CacheActMission(c context.Context, id int64, lid int64, mid int64) (res int64, err error)
CacheActMission get data from mc
func (*Dao) CacheActMissionFriends ¶
func (d *Dao) CacheActMissionFriends(c context.Context, id int64, lid int64) (res *likemdl.ActMissionGroups, err error)
CacheActMissionFriends get data from mc
func (*Dao) CacheActSubject ¶
CacheActSubject get data from mc
func (*Dao) CacheActSubjectMaxID ¶
CacheActSubjectMaxID get data from mc
func (*Dao) CacheActSubjectProtocol ¶
func (d *Dao) CacheActSubjectProtocol(c context.Context, id int64) (res *likemdl.ActSubjectProtocol, err error)
CacheActSubjectProtocol get data from mc
func (*Dao) CacheActUserAchieve ¶
func (d *Dao) CacheActUserAchieve(c context.Context, id int64) (res *likemdl.ActLikeUserAchievement, err error)
CacheActUserAchieve get data from mc
func (*Dao) CacheActUserAward ¶
CacheActUserAward get data from mc
func (*Dao) CacheLikeActs ¶
func (dao *Dao) CacheLikeActs(c context.Context, sid, mid int64, lids []int64) (res map[int64]int, err error)
CacheLikeActs res value val -1:no like 1:has like 0:no value.
func (*Dao) CacheLikeContent ¶
func (d *Dao) CacheLikeContent(c context.Context, ids []int64) (res map[int64]*likemdl.LikeContent, err error)
CacheLikeContent get data from mc
func (*Dao) CacheLikeMaxID ¶
CacheLikeMaxID get data from mc
func (*Dao) CacheLikeMissionBuff ¶
CacheLikeMissionBuff get data from mc
func (*Dao) CacheLikes ¶
CacheLikes get data from mc
func (*Dao) CacheMatchSubjects ¶
func (d *Dao) CacheMatchSubjects(c context.Context, ids []int64) (res map[int64]*match.Object, err error)
CacheMatchSubjects .
func (*Dao) CacheMissionGroupItems ¶
func (d *Dao) CacheMissionGroupItems(c context.Context, ids []int64) (res map[int64]*likemdl.MissionGroup, err error)
CacheMissionGroupItems get data from mc
func (*Dao) CacheRedDotTs ¶
CacheRedDotTs .
func (*Dao) CacheSourceItemData ¶
CacheSourceItemData get data from mc
func (*Dao) CacheSubjectStat ¶
CacheSubjectStat get data from mc
func (*Dao) CacheViewRank ¶
CacheViewRank get data from mc
func (*Dao) DelActMatchCache ¶
DelActMatchCache del match cache
func (*Dao) DelCacheActMissionFriends ¶
DelCacheActMissionFriends delete data from mc
func (*Dao) DelLikeListCtime ¶
DelLikeListCtime delete likeList Ctime cache .
func (*Dao) DelObjectCache ¶
DelObjectCache del object cache
func (*Dao) DelUserLogCache ¶
DelUserLogCache delete user log cache.
func (*Dao) GroupItemData ¶
func (dao *Dao) GroupItemData(c context.Context, sid int64, ck string) (data []*like.GroupItem, err error)
GroupItemData like data.
func (*Dao) IPReqquestCheck ¶
IPReqquestCheck check ip has ben used or not .
func (*Dao) IncrStoryEachLikeAct ¶
func (dao *Dao) IncrStoryEachLikeAct(c context.Context, sid, mid, lid int64, score int64) (res int64, err error)
IncrStoryEachLikeAct .
func (*Dao) IncrStoryLikeSum ¶
func (dao *Dao) IncrStoryLikeSum(c context.Context, sid, mid int64, score int64) (res int64, err error)
IncrStoryLikeSum .
func (*Dao) InrcMissionLikeLimit ¶
func (d *Dao) InrcMissionLikeLimit(c context.Context, sid, mid int64, val int64) (res bool, err error)
InrcMissionLikeLimit .
func (*Dao) LikeActAdd ¶
LikeActAdd add like_action .
func (*Dao) LikeActInfos ¶
func (dao *Dao) LikeActInfos(c context.Context, lids []int64, mid int64) (likeActs map[int64]*l.Action, err error)
LikeActInfos get likesaction logs.
func (*Dao) LikeActLidCounts ¶
LikeActLidCounts get lid score.
func (*Dao) LikeActSums ¶
func (dao *Dao) LikeActSums(c context.Context, sid int64, lids []int64) (res []*l.LidLikeSum, err error)
LikeActSums get like_action likes sum data .
func (*Dao) LikeActZscore ¶
LikeActZscore .
func (*Dao) LikeActs ¶
func (dao *Dao) LikeActs(c context.Context, sid, mid int64, lids []int64) (res map[int64]int, err error)
LikeActs get data from cache if miss will call source method, then add to cache.
func (*Dao) LikeContent ¶
func (d *Dao) LikeContent(c context.Context, keys []int64) (res map[int64]*likemdl.LikeContent, err error)
LikeContent get data from cache if miss will call source method, then add to cache.
func (*Dao) LikeListCtime ¶
LikeListCtime set like list by ctime.
func (*Dao) LikeListMoreLid ¶
LikeListMoreLid get likes data with like.id greater than lid
func (*Dao) LikeMissionBuff ¶
LikeMissionBuff get data from cache if miss will call source method, then add to cache.
func (*Dao) LikeRandom ¶
LikeRandom .
func (*Dao) LikeRandomCount ¶
LikeRandomCount .
func (*Dao) LikeRegionCache ¶
func (dao *Dao) LikeRegionCache(c context.Context, sid int64, regionID int16, start, end int) (likes []*like.Item, err error)
LikeRegionCache get like region cache.
func (*Dao) LikeRegionCnt ¶
LikeRegionCnt get like region cnt.
func (*Dao) LikeTagCache ¶
func (dao *Dao) LikeTagCache(c context.Context, sid, tagID int64, start, end int) (likes []*like.Item, err error)
LikeTagCache get like tag cache.
func (*Dao) LikeTagCnt ¶
LikeTagCnt get like tag cnt.
func (*Dao) LikeTypeList ¶
LikeTypeList dao sql.
func (*Dao) LikesBySid ¶
LikesBySid get sid all likes .
func (*Dao) ListFromES ¶
func (dao *Dao) ListFromES(c context.Context, sid int64, order string, ps, pn int, seed int64) (res *like.ListInfo, err error)
ListFromES .
func (*Dao) LotteryIndex ¶
func (d *Dao) LotteryIndex(c context.Context, actID, platform, source, mid int64) (res *l.Lottery, err error)
LotteryIndex .
func (*Dao) MatchCache ¶
MatchCache get match from cache.
func (*Dao) MatchSubjects ¶
func (d *Dao) MatchSubjects(c context.Context, keys []int64) (res map[int64]*likemdl.Object, err error)
MatchSubjects get data from cache if miss will call source method, then add to cache.
func (*Dao) MissionGroupAdd ¶
MissionGroupAdd add like_mission_group data .
func (*Dao) MissionGroupItems ¶
func (d *Dao) MissionGroupItems(c context.Context, keys []int64) (res map[int64]*likemdl.MissionGroup, err error)
MissionGroupItems get data from cache if miss will call source method, then add to cache.
func (*Dao) MissionLidRank ¶
MissionLidRank .
func (*Dao) MissionLidScore ¶
MissionLidScore .
func (*Dao) MissionLikeLimit ¶
MissionLikeLimit .
func (*Dao) MissionScoreList ¶
func (d *Dao) MissionScoreList(c context.Context, sid int64, start, end int) (data []int64, err error)
MissionScoreList score list .
func (*Dao) NewestSubject ¶
NewestSubject get newest subject list.
func (*Dao) ObjectCache ¶
ObjectCache get object from cache.
func (*Dao) ObjectsCache ¶
func (d *Dao) ObjectsCache(c context.Context, sid int64, start, end int) (res []*match.Object, total int, err error)
ObjectsCache get object list from cache.
func (*Dao) ObjectsUnStart ¶
ObjectsUnStart get unstart objects.
func (*Dao) OidInfoFromES ¶
func (dao *Dao) OidInfoFromES(c context.Context, oids []int64, sType int) (res map[int64]*like.Item, err error)
OidInfoFromES .
func (*Dao) RawActLikeAchieves ¶
func (d *Dao) RawActLikeAchieves(c context.Context, sid int64) (res *likemdl.Achievements, err error)
RawActLikeAchieves .
func (*Dao) RawActMission ¶
RawActMission .
func (*Dao) RawActMissionFriends ¶
func (d *Dao) RawActMissionFriends(c context.Context, sid, lid int64) (res *l.ActMissionGroups, err error)
RawActMissionFriends .
func (*Dao) RawActSubject ¶
RawActSubject get act_subject by id .
func (*Dao) RawActSubjectProtocol ¶
func (dao *Dao) RawActSubjectProtocol(c context.Context, sid int64) (res *lmdl.ActSubjectProtocol, err error)
RawActSubjectProtocol .
func (*Dao) RawActUserAchieve ¶
func (d *Dao) RawActUserAchieve(c context.Context, id int64) (res *l.ActLikeUserAchievement, err error)
RawActUserAchieve .
func (*Dao) RawLikeContent ¶
func (dao *Dao) RawLikeContent(c context.Context, ids []int64) (res map[int64]*l.LikeContent, err error)
RawLikeContent .
func (*Dao) RawLikeMissionBuff ¶
RawLikeMissionBuff get mid has .
func (*Dao) RawMatchSubjects ¶
func (d *Dao) RawMatchSubjects(c context.Context, ids []int64) (res map[int64]*match.Object, err error)
RawMatchSubjects .
func (*Dao) RawMissionGroupItems ¶
func (d *Dao) RawMissionGroupItems(c context.Context, lids []int64) (res map[int64]*l.MissionGroup, err error)
RawMissionGroupItems get mission_group item by ids.
func (*Dao) RawSourceItemData ¶
RawSourceItemData get source data.
func (*Dao) RedisCache ¶
func (dao *Dao) RedisCache(c context.Context, sid int64, start, end int) (res []*l.LidLikeRes, err error)
RedisCache get cache order by like .
func (*Dao) SetActMatchCache ¶
SetActMatchCache set match list cache.
func (*Dao) SetEachLikeSum ¶
SetEachLikeSum .
func (*Dao) SetIPRequest ¶
SetIPRequest set ip has been used
func (*Dao) SetInfoCache ¶
SetInfoCache Dao
func (*Dao) SetInitializeLikeCache ¶
func (dao *Dao) SetInitializeLikeCache(c context.Context, sid int64, lidLikeAct map[int64]int64, typeLike map[int64]int) (err error)
SetInitializeLikeCache initialize like_action like data .
func (*Dao) SetLikeRandom ¶
SetLikeRandom .
func (*Dao) SetLikeRegionCache ¶
func (dao *Dao) SetLikeRegionCache(c context.Context, sid int64, regionID int16, likes []*like.Item) (err error)
SetLikeRegionCache set like region cache.
func (*Dao) SetLikeSum ¶
SetLikeSum .
func (*Dao) SetLikeTagCache ¶
func (dao *Dao) SetLikeTagCache(c context.Context, sid, tagID int64, likes []*like.Item) (err error)
SetLikeTagCache set like tag cache no expire.
func (*Dao) SetMatchCache ¶
SetMatchCache set match to cache.
func (*Dao) SetMissionTop ¶
func (d *Dao) SetMissionTop(c context.Context, sid, lid int64, score int64, ctime int64) (count int64, err error)
SetMissionTop .
func (*Dao) SetObjectCache ¶
SetObjectCache set object to cache.
func (*Dao) SetObjectsCache ¶
func (d *Dao) SetObjectsCache(c context.Context, sid int64, objects []*match.Object, total int) (err error)
SetObjectsCache set object list cache.
func (*Dao) SetRedisCache ¶
SetRedisCache .
func (*Dao) SetTagLikeCountsCache ¶
func (dao *Dao) SetTagLikeCountsCache(c context.Context, sid int64, counts map[int64]int32) (err error)
SetTagLikeCountsCache .
func (*Dao) SetUserLogCache ¶
func (d *Dao) SetUserLogCache(c context.Context, sid, mid int64, userLogs []*match.UserLog) (err error)
SetUserLogCache set user log list cache.
func (*Dao) SourceItem ¶
SourceItem get source data json raw message.
func (*Dao) SourceItemData ¶
SourceItemData get data from cache if miss will call source method, then add to cache.
func (*Dao) StoryEachLikeAct ¶
func (dao *Dao) StoryEachLikeAct(c context.Context, sid, mid, lid int64, stime, etime string) (res int64, err error)
StoryEachLikeAct .
func (*Dao) StoryEachLikeSum ¶
StoryEachLikeSum .
func (*Dao) StoryLikeActSum ¶
func (dao *Dao) StoryLikeActSum(c context.Context, sid, mid int64, stime, etime string) (res int64, err error)
StoryLikeActSum .
func (*Dao) StoryLikeSum ¶
StoryLikeSum .
func (*Dao) SubjectListMoreSid ¶
func (dao *Dao) SubjectListMoreSid(c context.Context, minSid int64) (res []*like.SubjectItem, err error)
SubjectListMoreSid get subject more sid .
func (*Dao) SubjectMaxID ¶
SubjectMaxID get act_subject max id .
func (*Dao) TagLikeCountsCache ¶
func (dao *Dao) TagLikeCountsCache(c context.Context, sid int64, tagIDs []int64) (counts map[int64]int32, err error)
TagLikeCountsCache get tag like counts cache.
func (*Dao) UserAchievement ¶
func (d *Dao) UserAchievement(c context.Context, sid, mid int64) (res []*l.ActLikeUserAchievement, err error)
UserAchievement .
func (*Dao) UserLogCache ¶
UserLogCache get user log list from cache.