Browse Source

Merge branch 'cygx_14.2' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

zhangchuanxing 2 months ago
parent
commit
08e57cb57b
2 changed files with 6 additions and 4 deletions
  1. 3 1
      controllers/report.go
  2. 3 3
      models/report.go

+ 3 - 1
controllers/report.go

@@ -2981,7 +2981,7 @@ func (this *ReportController) SearchReportAndResource() {
 	}
 	//匹配报告标题、
 	//condition = `AND ( a.title LIKE '%` + keyWord + `%' OR  a.body LIKE '%` + keyWord + `%' OR  a.annotation LIKE '%` + keyWord + `%' OR  a.abstract LIKE '%` + keyWord + `%') AND a.publish_status = 1 `
-	condition = `AND ( a.title LIKE '%` + keyWord + `%' OR  a.annotation LIKE '%` + keyWord + `%' OR  a.abstract LIKE '%` + keyWord + `%') AND a.publish_status = 1 `
+	condition = `AND ( a.title LIKE '%` + keyWord + `%' OR  a.body_text LIKE '%` + keyWord + `%'  OR  a.annotation LIKE '%` + keyWord + `%' OR  a.abstract LIKE '%` + keyWord + `%') AND a.publish_status = 1 `
 	sqlGroup = ` GROUP BY  a.article_id  ORDER BY a.publish_date DESC  `
 	//if pageSize > 0 {
 	//	sqlGroup += ` LIMIT 5 `
@@ -2996,6 +2996,7 @@ func (this *ReportController) SearchReportAndResource() {
 		br.ErrMsg = "获取研选文章列表失败,Err:" + err.Error()
 		return
 	}
+
 	//ListHzReport, err := models.GetReoprtSearchList(` AND a.article_type_id NOT IN (`+articleTypeIds+`) `+condition+sqlGroup, user.UserId)
 	//if err != nil {
 	//	br.Msg = "获取信息失败"
@@ -3009,6 +3010,7 @@ func (this *ReportController) SearchReportAndResource() {
 		br.ErrMsg = "获取分词失败,GetIndustryMapNameSliceV3 Err: " + err.Error()
 		return
 	}
+
 	keyWordArr = services.RemoveDuplicatesAndEmpty(keyWordArr)
 	var keyWordIk string
 	if len(keyWordArr) > 1 {

+ 3 - 3
models/report.go

@@ -595,9 +595,9 @@ func GetArticleCollectionList(condition string, userId int) (items []*ArticleCol
 			( SELECT count( 1 ) FROM cygx_article_collect AS ac WHERE ac.article_id = a.article_id  AND user_id = ? ) AS my_collect_num
 		FROM
 			cygx_article AS a
-			INNER JOIN cygx_industrial_article_group_management AS mg ON mg.article_id = a.article_id
-			INNER JOIN cygx_industrial_management AS m ON m.industrial_management_id = mg.industrial_management_id
-			INNER JOIN cygx_article_department AS d ON d.department_id = a.department_id 
+			LEFT JOIN cygx_industrial_article_group_management AS mg ON mg.article_id = a.article_id
+			LEFT  JOIN cygx_industrial_management AS m ON m.industrial_management_id = mg.industrial_management_id
+			LEFT JOIN cygx_article_department AS d ON d.department_id = a.department_id 
 		WHERE
 			1 = 1  AND a.publish_status = 1  `
 	if condition != "" {