|
@@ -142,11 +142,13 @@ func (l *BusinessIntelligence) MeListCount(classify string, userid string, data
|
|
|
count = qutil.If(allCount > maxCount, maxCount, allCount).(int64)
|
|
|
return
|
|
|
case "projectFollowCount": //项目关注
|
|
|
- _, err := entity.CreateProjectFollowManager(l.Session())
|
|
|
+ followProjectManager, err := entity.CreateProjectFollowManager(l.Session())
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|
|
|
- count = db.Base.CountBySql(`select count(*) from follow_project_monitor where s_userid= ?`, userid)
|
|
|
+ allCount := db.Base.CountBySql(`select count(*) from follow_project_monitor where s_userid= ?`, userid)
|
|
|
+ maxNum := gconv.Int64(followProjectManager.MaxNum)
|
|
|
+ count = qutil.If(allCount > maxNum, maxNum, allCount).(int64)
|
|
|
return
|
|
|
case "entFollowCount": //企业关注
|
|
|
followEntManager, err := entity.CreateEntFollowManager(l.Session())
|
|
@@ -154,7 +156,8 @@ func (l *BusinessIntelligence) MeListCount(classify string, userid string, data
|
|
|
return
|
|
|
}
|
|
|
allCount := db.Base.CountBySql(fmt.Sprintf(`SELECT count(*) FROM follow_ent_monitor WHERE s_userid="%s" `, userid))
|
|
|
- count = qutil.If(allCount > gconv.Int64(followEntManager.MaxNum), followEntManager.MaxNum, allCount).(int64)
|
|
|
+ maxNum := gconv.Int64(followEntManager.MaxNum)
|
|
|
+ count = qutil.If(allCount > maxNum, maxNum, allCount).(int64)
|
|
|
return
|
|
|
}
|
|
|
}
|