wangkaiyue 2 tahun lalu
induk
melakukan
022e6a1a7e
2 mengubah file dengan 14 tambahan dan 0 penghapusan
  1. 7 0
      entity/mananger/aheadManager.go
  2. 7 0
      entity/mananger/customManager.go

+ 7 - 0
entity/mananger/aheadManager.go

@@ -75,6 +75,13 @@ func (this *AheadManager) Click(userId string) bool {
 
 // CheckGroupUser 校验用户是否有资格展示
 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()
 	defer this.RUnlock()
 	_, exists = this.UserGroup[userId]

+ 7 - 0
entity/mananger/customManager.go

@@ -271,6 +271,13 @@ func (this *CustomManager) DoSearch() {
 
 // checkActivityUser 校验用户是否是活跃用户
 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()
 	defer this.RUnlock()
 	_, exists = this.UserGroup[userId]