xiexiaoyuan преди 3 години
родител
ревизия
d940b5fec5
променени са 3 файла, в които са добавени 10 реда и са изтрити 4 реда
  1. 4 4
      models/tables/rddp/report/query.go
  2. 3 0
      services/report/classify.go
  3. 3 0
      services/report/report.go

+ 4 - 4
models/tables/rddp/report/query.go

@@ -256,7 +256,7 @@ FROM
 WHERE
 WHERE
 	classify_name_first != "晨报" 
 	classify_name_first != "晨报" 
 	AND classify_name_first != "周报" 
 	AND classify_name_first != "周报" 
-	AND classify_id_second in (?)
+	AND classify_id_second in ?
 	AND state = 2
 	AND state = 2
 	)
 	)
 UNION
 UNION
@@ -276,7 +276,7 @@ FROM
 	report_chapter
 	report_chapter
 WHERE
 WHERE
 	publish_state = 2
 	publish_state = 2
-	AND type_id in (?)
+	AND type_id in ?
 	)
 	)
 	ORDER BY publish_time DESC, report_id desc LIMIT ? OFFSET ?
 	ORDER BY publish_time DESC, report_id desc LIMIT ? OFFSET ?
 	`
 	`
@@ -293,7 +293,7 @@ FROM
 WHERE
 WHERE
         classify_name_first != "晨报" 
         classify_name_first != "晨报" 
         AND classify_name_first != "周报" 
         AND classify_name_first != "周报" 
-        AND classify_id_second in (55,35,58,65,61,47)
+        AND classify_id_second in ?
         AND state = 2
         AND state = 2
         )
         )
 UNION
 UNION
@@ -305,7 +305,7 @@ FROM
         report_chapter
         report_chapter
 WHERE
 WHERE
         publish_state = 2
         publish_state = 2
-        AND type_id in (9,28)
+        AND type_id in ?
         )
         )
 ) as ru
 ) as ru
 	`
 	`

+ 3 - 0
services/report/classify.go

@@ -222,6 +222,9 @@ func GetClassifyReportList(user user.UserInfo, classifyIdSecond int, pageIndex,
 			reportItem.ClassifyNameSecond = reportInfo.ClassifyNameSecond
 			reportItem.ClassifyNameSecond = reportInfo.ClassifyNameSecond
 			reportItem.Stage = reportInfo.Stage
 			reportItem.Stage = reportInfo.Stage
 			reportItem.Abstract = reportInfo.Abstract
 			reportItem.Abstract = reportInfo.Abstract
+			if reportInfo.Abstract != "" {
+				reportItem.Abstract = "<div style=\"overflow: hidden;white-space: nowrap;text-overflow: ellipsis;\">" +reportInfo.Abstract+"</div>"
+			}
 			reportItem.Author = reportInfo.Author
 			reportItem.Author = reportInfo.Author
 			reportItem.ReportImgUrl = classifyInfo.ReportImgUrl
 			reportItem.ReportImgUrl = classifyInfo.ReportImgUrl
 			reportItem.VideoName = reportInfo.VideoName
 			reportItem.VideoName = reportInfo.VideoName

+ 3 - 0
services/report/report.go

@@ -727,6 +727,9 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
 			reportItem.ClassifyIdSecond = reportInfo.ClassifyIdSecond
 			reportItem.ClassifyIdSecond = reportInfo.ClassifyIdSecond
 			reportItem.Stage = reportInfo.Stage
 			reportItem.Stage = reportInfo.Stage
 			reportItem.Abstract = reportInfo.Abstract
 			reportItem.Abstract = reportInfo.Abstract
+			if reportInfo.Abstract != "" {
+				reportItem.Abstract = "<div style=\"overflow: hidden;white-space: nowrap;text-overflow: ellipsis;\">" +reportInfo.Abstract+"</div>"
+			}
 			reportItem.Author = reportInfo.Author
 			reportItem.Author = reportInfo.Author
 			stageStr := reportInfo.StageStr
 			stageStr := reportInfo.StageStr
 			if stageStr == "" {
 			if stageStr == "" {