package dbstruct type UserVisitOffset struct { Id int64 `json:"id" bson:"_id"` // id,用户的mid StreamerRecommOffset int64 `json:"streamer_recomm_offset" bson:"streamer_recomm_offset"` // 主播推荐列表偏移量 BottomFlag *int64 `json:"bottom_flag" bson:"bottom_flag"` // 是否触底标志 Ver int64 `json:"ver" bson:"ver"` // 乐观锁 } func (p *UserVisitOffset) GetBottomFlag() int64 { if p == nil || p.BottomFlag == nil { return 0 } return *p.BottomFlag }