wangkaiyue 2 жил өмнө
parent
commit
022e6a1a7e

+ 7 - 0
entity/mananger/aheadManager.go

@@ -75,6 +75,13 @@ func (this *AheadManager) Click(userId string) bool {
 
 
 // CheckGroupUser 校验用户是否有资格展示
 // CheckGroupUser 校验用户是否有资格展示
 func (this *AheadManager) checkGroupUser(userId string) (exists bool) {
 func (this *AheadManager) checkGroupUser(userId string) (exists bool) {
+	if len(vars.Config.TestUid) > 0 {
+		for _, uid := range vars.Config.TestUid {
+			if uid == userId {
+				return true
+			}
+		}
+	}
 	this.RLock()
 	this.RLock()
 	defer this.RUnlock()
 	defer this.RUnlock()
 	_, exists = this.UserGroup[userId]
 	_, exists = this.UserGroup[userId]

+ 7 - 0
entity/mananger/customManager.go

@@ -271,6 +271,13 @@ func (this *CustomManager) DoSearch() {
 
 
 // checkActivityUser 校验用户是否是活跃用户
 // checkActivityUser 校验用户是否是活跃用户
 func (this *CustomManager) checkActivityUser(userId string) (exists bool) {
 func (this *CustomManager) checkActivityUser(userId string) (exists bool) {
+	if len(vars.Config.TestUid) > 0 {
+		for _, uid := range vars.Config.TestUid {
+			if uid == userId {
+				return true
+			}
+		}
+	}
 	this.RLock()
 	this.RLock()
 	defer this.RUnlock()
 	defer this.RUnlock()
 	_, exists = this.UserGroup[userId]
 	_, exists = this.UserGroup[userId]