From 27763ca325dd4c6abc0a4fcb3e423ca611d0878f Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 12 Sep 2024 10:50:17 +0800 Subject: [PATCH] 1 --- app/db/db_store.go | 2 +- app/svc/svc_store.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/db/db_store.go b/app/db/db_store.go index 7600c85..402c9b9 100644 --- a/app/db/db_store.go +++ b/app/db/db_store.go @@ -13,7 +13,7 @@ func GetStore(eg *xorm.Engine, arg map[string]string) []map[string]string { sel := ` *,sqrt( ( (( %f - lng)*PI()*12656*cos((( %f +lat)/2)*PI()/180)/180) * (( %f - lng)*PI()*12656*cos (((%f+lat)/2)*PI()/180)/180) ) + ( ((%f-lat)*PI()*12656/180) * ((%f-lat)*PI()*12656/180) ) ) AS km` sel = fmt.Sprintf(sel, lng, lat, lng, lat, lat, lat) sql := `select %s from community_team_store where %s %s` - where := "1=1" + where := "state=1" if arg["parent_uid"] != "" { where += " and store_type=2 and parent_uid=" + arg["parent_uid"] } else if arg["uid"] != "" { diff --git a/app/svc/svc_store.go b/app/svc/svc_store.go index 0ec26ab..928a365 100644 --- a/app/svc/svc_store.go +++ b/app/svc/svc_store.go @@ -41,6 +41,7 @@ func BankStore(c *gin.Context) { "id": v["id"], "km": v["km"], "time_str": v["timer"], + "uid": v["uid"], "phone": v["phone"], "logo": v["logo"], "is_like": "0",