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 ?"