Browse Source

搜索优化

xiexiaoyuan 2 năm trước cách đây
mục cha
commit
cb985a65a4
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      controller/english_report/english_report.go

+ 2 - 2
controller/english_report/english_report.go

@@ -160,9 +160,9 @@ func (er *EnglishReportController) FilterByEs(c *gin.Context) {
 		resp.FailMsg("请输入搜索词", "", c)
 		return
 	}
-
+	from := (req.Current - 1) * req.PageSize
 	reportList := make([]*english_report.SearchEnglishReportItem, 0)
-	searchResp, total, err := elasticService.SearchESEnglishReport(req.KeyWord, req.Current, req.PageSize)
+	searchResp, total, err := elasticService.SearchESEnglishReport(req.KeyWord, from, req.PageSize)
 	if err != nil {
 		resp.FailMsg("报告搜索失败", "报告搜索失败,Err:" + err.Error(), c)
 		return