|
@@ -32,7 +32,7 @@ type UserAnalystFollowList struct {
|
|
|
|
|
|
func GetPostUser(authorName string, PublishTime string) (ids []int) {
|
|
|
db := models.Main()
|
|
|
- err := db.Model(&UserAnalystFollowList{}).Select("user_id").Where("financial_analyst_name = ? and followed = ? and followed_time <=Date(?)", authorName, Following, PublishTime).Order("id asc").Find(&ids).Error
|
|
|
+ err := db.Model(&UserAnalystFollowList{}).Select("distinct user_id").Where("financial_analyst_name = ? and followed = ? and followed_time <=Date(?)", authorName, Following, PublishTime).Order("id asc").Find(&ids).Error
|
|
|
if err != nil {
|
|
|
return []int{}
|
|
|
}
|