|
@@ -3005,14 +3005,14 @@ func (this *UserController) CompanyList() {
|
|
|
}
|
|
|
|
|
|
//机构阅读数量太大,先存下来,后面优化
|
|
|
- detailConfig, err := cygx.GetCygxConfigDetailByCode("company_article_history_num")
|
|
|
- if err != nil {
|
|
|
- br.Msg = "获取失败"
|
|
|
- br.ErrMsg = "获取数据失败,Err:" + err.Error()
|
|
|
- return
|
|
|
- }
|
|
|
+ //detailConfig, err := cygx.GetCygxConfigDetailByCode("company_article_history_num")
|
|
|
+ //if err != nil {
|
|
|
+ // br.Msg = "获取失败"
|
|
|
+ // br.ErrMsg = "获取数据失败,Err:" + err.Error()
|
|
|
+ // return
|
|
|
+ //}
|
|
|
|
|
|
- total, _ = strconv.Atoi(detailConfig.ConfigValue)
|
|
|
+ //total, _ = strconv.Atoi(detailConfig.ConfigValue)
|
|
|
//total, err = cygx.GetCygxArticleHistoryCountByCompany(condition)
|
|
|
//if err != nil {
|
|
|
// br.Msg = "获取信息失败"
|
|
@@ -3021,7 +3021,8 @@ func (this *UserController) CompanyList() {
|
|
|
//}
|
|
|
|
|
|
//fmt.Println("es 搜索")
|
|
|
- _, esList, err := services.SearcCygxArticleHistoryData(utils.IndexNameArticleHistory, keyWord, startDate, endDate, companyIds, startSize, pageSize)
|
|
|
+ totalEs, esList, err := services.SearcCygxArticleHistoryData(utils.IndexNameArticleHistory, keyWord, startDate, endDate, companyIds, startSize, pageSize)
|
|
|
+ total = int(totalEs)
|
|
|
var articleIds string
|
|
|
if len(esList) > 0 {
|
|
|
articleIdMap := make(map[int]int)
|
|
@@ -3036,9 +3037,12 @@ func (this *UserController) CompanyList() {
|
|
|
articleIds = strings.TrimRight(articleIds, ",")
|
|
|
if articleIds != "" {
|
|
|
condition = ` AND r.id IN (` + articleIds + `) `
|
|
|
+ } else {
|
|
|
+ condition = ` AND r.id = 0 `
|
|
|
}
|
|
|
-
|
|
|
- list, err = cygx.GetCygxArticleHistoryRecordByCompanyList(condition, 0, 0)
|
|
|
+ //fmt.Println(articleIds)
|
|
|
+ //return
|
|
|
+ list, err = cygx.GetCygxArticleHistoryRecordByCompanyList(condition, 0, pageSize)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "获取信息失败"
|
|
|
br.ErrMsg = "获取用户阅读记录,Err:" + err.Error()
|