瀏覽代碼

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

xyxie 1 天之前
父節點
當前提交
0e2a919155
共有 1 個文件被更改,包括 3 次插入0 次删除
  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))