4 Commits cadd3e28f2 ... 5b30bdf7da

Author SHA1 Message Date
  xiziwen 5b30bdf7da Merge branch 'out_report_2.1' 3 days ago
  xiziwen 702d4533ab fix 3 days ago
  xiziwen 277b3e643c fix 3 days ago
  xiziwen cff8424690 fix 3 days ago

+ 1 - 1
models/document_manage_model/outside_report.go

@@ -65,7 +65,7 @@ func GetOutsideReportListByConditionCount(condition string, pars []interface{})
 // GetOutsideReportListByCondition 根据条件查询列表
 func GetOutsideReportListByCondition(condition string, pars []interface{}, currentIndex int, pageSize int) (list []OutsideReport, err error) {
 	o := orm.NewOrmUsingDB("rddp")
-	sql := `select t1.outside_report_id, t1.source, t1.title, t1.abstract, t1.classify_id, 
+	sql := `select DISTINCT t1.outside_report_id, t1.source, t1.title, t1.abstract, t1.classify_id, 
 t1.classify_name, t1.sys_user_id, t1.sys_user_name, t1.email_message_uid, t1.report_update_time, 
 t1.modify_time, t1.create_time, t1.report_code from outside_report t1 
 left join chart_permission_search_key_word_mapping t2 on t1.classify_id = t2.classify_id  where 1 = 1 `

+ 2 - 2
models/report.go

@@ -201,9 +201,9 @@ func GetReportListV1(condition string, pars []interface{}, startSize, pageSize i
 func GetReportListByCondition(condition string, pars []interface{}, startSize, pageSize int) (items []*ReportList, err error) {
 	o := orm.NewOrmUsingDB("rddp")
 
-	sql := `SELECT a.id, a.title, a.author, a.modify_time, a.publish_time,a.classify_id_first,
+	sql := `SELECT DISTINCT a.id, a.title, a.author, a.modify_time, a.publish_time,a.classify_id_first,
 a.classify_name_first,a.classify_id_second,a.classify_name_second,a.classify_id_third,
-a.classify_name_third FROM report as a WHERE 1=1  `
+a.classify_name_third,a.abstract,a.admin_id,a.admin_real_name,a.last_modify_admin_id,a.last_modify_admin_name FROM report as a WHERE 1=1  `
 	if condition != "" {
 		sql += condition
 	}

+ 5 - 5
services/document_manage_service/document_manage_service.go

@@ -174,9 +174,9 @@ func DocumentReportList(documentType int, chartPermissionIdList []string, classi
 	}
 
 	if orderField != "" && orderType != "" {
-		condition += ` group by t1.outside_report_id order by t1.` + orderField + ` ` + orderType
+		condition += ` order by t1.` + orderField + ` ` + orderType
 	} else {
-		condition += ` group by t1.outside_report_id order by t1.report_update_time desc`
+		condition += ` order by t1.report_update_time desc`
 	}
 
 	outsideReportList, err := document_manage_model.GetOutsideReportListByCondition(condition, pars, startSize, pageSize)
@@ -237,7 +237,7 @@ func RuiSiReportList(classifyIdFirst, classifyIdSecond, classifyIdThird int, cha
 	}
 
 	// 作者为 全球市场战略研究中心 PCI Research
-	condition += ` and a.author = '全球市场中心 PCI Research'`
+	condition += ` and a.author = '战研中心 PCIR'`
 	// 已发布的报告
 	condition += ` and a.state = 2`
 
@@ -276,9 +276,9 @@ func RuiSiReportList(classifyIdFirst, classifyIdSecond, classifyIdThird int, cha
 	}
 
 	if orderField != "" && orderType != "" {
-		condition += ` group by a.id order by a.` + orderField + ` ` + orderType
+		condition += ` order by a.` + orderField + ` ` + orderType
 	} else {
-		condition += ` group by a.id order by a.publish_time desc`
+		condition += ` order by a.publish_time desc`
 	}
 
 	reportList, err := models.GetReportListByCondition(condition, pars, startSize, pageSize)