From ed28a26a6b1b78b6cf43291fde0d0cc9f73be58e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 17 Dec 2020 10:08:51 +0800 Subject: [PATCH] a --- business/model/dao/dao_job.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/model/dao/dao_job.go b/business/model/dao/dao_job.go index 31f7bfb83..d71ef0f38 100644 --- a/business/model/dao/dao_job.go +++ b/business/model/dao/dao_job.go @@ -67,7 +67,7 @@ func GetJobs(db *DaoDB, userIDs []string, categoryIDs, statuss, vendorIDs, types sqlParams = []interface{}{} ) sql := ` - SELECT SQL_CALC_FOUND_ROWS a.*, b.name, getDistance(?, ?, a.lng, a.lat) distance + SELECT SQL_CALC_FOUND_ROWS a.*, b.name, getDistance(?, ?, CAST(a.lng AS DECIMAL(15,6))/1000000, CAST(a.lat AS DECIMAL(15,6))/1000000) distance FROM job a JOIN job_category b ON b.id = a.job_category_id AND b.deleted_at = ? WHERE a.deleted_at = ?