|
@@ -53,6 +53,9 @@ func FollowAnalystsByName(userId int, analystNames []string, followType string)
|
|
|
|
|
|
err = exception.New(exception.AnalystNotFound)
|
|
|
}
|
|
|
+ if FinancialAnalystDTO.Id == 0 || FinancialAnalystDTO.Name == "" {
|
|
|
+ continue
|
|
|
+ }
|
|
|
followDTO := userService.FollowDTO{
|
|
|
UserId: userId,
|
|
|
AnalystId: FinancialAnalystDTO.Id,
|
|
@@ -81,6 +84,10 @@ func FollowAnalyst(userId int, analystId int, followType string) (err error) {
|
|
|
if err != nil {
|
|
|
err = exception.New(exception.AnalystNotFound)
|
|
|
}
|
|
|
+ if FinancialAnalystDTO.Id == 0 || FinancialAnalystDTO.Name == "" {
|
|
|
+ err = exception.New(exception.AnalystNotFound)
|
|
|
+ return
|
|
|
+ }
|
|
|
followDTO := userService.FollowDTO{
|
|
|
UserId: userId,
|
|
|
AnalystId: analystId,
|
|
@@ -177,6 +184,10 @@ func FollowAnalystByName(userId int, analystName string, followType string) (err
|
|
|
if err != nil {
|
|
|
err = exception.New(exception.AnalystNotFound)
|
|
|
}
|
|
|
+ if FinancialAnalystDTO.Id == 0 || FinancialAnalystDTO.Name == "" {
|
|
|
+ err = exception.New(exception.AnalystNotFound)
|
|
|
+ return
|
|
|
+ }
|
|
|
followDTO := userService.FollowDTO{
|
|
|
UserId: userId,
|
|
|
AnalystId: FinancialAnalystDTO.Id,
|