Explorar el Código

关注列表为0时,直接返回

xyxie hace 4 días
padre
commit
0e2a919155
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      service/user/user_service.go

+ 3 - 0
service/user/user_service.go

@@ -334,6 +334,9 @@ func GetFollowingAnalystList(userId int) (followedList []FollowAnalystDTO, err e
 		return
 	}
 	followedList = make([]FollowAnalystDTO, 0)
+	if len(dtoList) == 0 {
+		return
+	}
 	analysts, err := convertToAnalystList(dtoList)
 	var wg sync.WaitGroup
 	wg.Add(len(analysts))