Jelajahi Sumber

排序问题

wd 2 tahun lalu
induk
melakukan
ae50a04608

+ 1 - 5
src/dashoo.cn/backend/api/business/oilcontract/contractSumScore/contractSumScoreService.go

@@ -297,11 +297,7 @@ func (s *OilContractSumScoreService) GetPagingComputeEntitiesWithOrderBytbl3(pag
 	sql += ` where 1=1 and c.InFlag != '3' and c.status = '8' ` + supplierWhere
 	sql += ` group by s.id, c.id, contract.SupplierId,contract.SupplierName `
 	sql += ` having ` + having
-	if asc {
-		sql += ` order by ` + orderby + ` ASC `
-	} else {
-		sql += ` order by ` + orderby + ` DESC `
-	}
+	sql += ` order by count(review.id) DESC `
 	if pageIndex != 0 && itemsPerPage != 0 {
 		sql += ` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage)
 	}