Ver código fonte

研究员筛选

kobe6258 8 meses atrás
pai
commit
06da8459bd
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      models/report.go

+ 1 - 1
models/report.go

@@ -86,7 +86,7 @@ func GetReportCountByCondition(condition string, pars []interface{}) (count int,
 
 
 func GetReportById(id int) (items *Report, err error) {
 func GetReportById(id int) (items *Report, err error) {
 	o := orm.NewOrm()
 	o := orm.NewOrm()
-	sql := `SELECT * FROM reports WHERE id =?`
+	sql := `SELECT distinct id ,title,abstract,author,published_time,send_status FROM reports WHERE id =?`
 	err = o.Raw(sql, id).QueryRow(&items)
 	err = o.Raw(sql, id).QueryRow(&items)
 	return
 	return
 }
 }