From 70f07549f66ba8aca13cbc48f8a8c1eebb3131db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 16 Nov 2020 17:10:44 +0800 Subject: [PATCH] by --- business/model/dao/dao_job.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/business/model/dao/dao_job.go b/business/model/dao/dao_job.go index 19d9fcd64..99f96d299 100644 --- a/business/model/dao/dao_job.go +++ b/business/model/dao/dao_job.go @@ -109,13 +109,13 @@ func GetJobs(db *DaoDB, userIDs []string, categoryIDs, statuss, vendorIDs, types } if sortType != 0 { if sortType == sortTypeDistance { - sql += ` ORDER distance` + sql += ` ORDER BY distance` } else if sortType == -sortTypeDistance { - sql += ` ORDER distance DESC` + sql += ` ORDER BY distance DESC` } else if sortType == sortTypeAvgPrice { - sql += ` ORDER a.avg_price` + sql += ` ORDER BY a.avg_price` } else if sortType == -sortTypeAvgPrice { - sql += ` ORDER a.avg_price DESC` + sql += ` ORDER BY a.avg_price DESC` } } sql += " LIMIT ? OFFSET ?"