Ver código fonte

feat:取消仅首页展示count个数

zhangxinlei1996 3 anos atrás
pai
commit
c0233d6f19
1 arquivos alterados com 6 adições e 6 exclusões
  1. 6 6
      service/portrait.go

+ 6 - 6
service/portrait.go

@@ -104,14 +104,14 @@ func (this *PortraitService) List(companyName string, pageSize, pageNum int64, i
 	var total int64
 	mustQueryArr := this.CommonPare(companyName)
 	log.Println("~~~~,", mustQueryArr)
-	//仅第一页查询总量(非数据导出)
+	// //仅第一页查询总量(非数据导出)
 
-	if pageNum == 1 {
-		total = elastic.Count(entity.BiddingIndex, entity.BiddingIndex, fmt.Sprintf(entity.NewMustSearch, strings.Join(mustQueryArr, ","), ""))
-		if total <= 0 {
-			return nil, 0, errors.New(entity.NO_DATA_ERROR_MSG)
-		}
+	// if pageNum == 1 {
+	total = elastic.Count(entity.BiddingIndex, entity.BiddingIndex, fmt.Sprintf(entity.NewMustSearch, strings.Join(mustQueryArr, ","), ""))
+	if total <= 0 {
+		return nil, 0, errors.New(entity.NO_DATA_ERROR_MSG)
 	}
+	// }
 	start, limit := (pageNum-1)*pageSize, pageSize
 	fields := `"title","area","subtype","_id","projectname","publishtime"`
 	if isExport {