浏览代码

Merge branch 'cygx_9.5' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 2 年之前
父节点
当前提交
3e9b5189dd
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      controllers/report.go

+ 8 - 0
controllers/report.go

@@ -2850,6 +2850,11 @@ func (this *ReportController) SearchReportAndResource() {
 		br.ErrMsg = "获取研选文章列表失败,Err:" + err.Error()
 		return
 	}
+	var articleIdsYx string
+	for _, v := range ListYxReport {
+		articleIdsYx = strconv.Itoa(v.ArticleId) + ","
+	}
+	articleIdsYx = strings.TrimRight(articleIdsYx, ",")
 	ListHzReport, err := models.GetReoprtSearchList(` AND a.article_type_id NOT IN (`+articleTypeIds+`) `+condition+sqlGroup, user.UserId)
 	if err != nil {
 		br.Msg = "获取信息失败"
@@ -2876,6 +2881,9 @@ func (this *ReportController) SearchReportAndResource() {
 		} else {
 			sqlGroupIk += ` LIMIT 20 `
 		}
+		if articleIdsYx != "" {
+			conditionIk += " AND  a.article_id NOT IN(" + articleIdsYx + ")"
+		}
 		//研选的联想词列表
 		ListYxReportIk, err := models.GetArticleCollectionList(` AND a.article_type_id IN (`+articleTypeIds+`) `+conditionIk+sqlGroupIk, user.UserId)
 		if err != nil && err.Error() != utils.ErrNoRow() {