|
@@ -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 := ` *,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) |
|
|
sel = fmt.Sprintf(sel, lng, lat, lng, lat, lat, lat) |
|
|
sql := `select %s from community_team_store where %s %s` |
|
|
sql := `select %s from community_team_store where %s %s` |
|
|
where := "1=1" |
|
|
|
|
|
|
|
|
where := "state=1" |
|
|
if arg["parent_uid"] != "" { |
|
|
if arg["parent_uid"] != "" { |
|
|
where += " and store_type=2 and parent_uid=" + arg["parent_uid"] |
|
|
where += " and store_type=2 and parent_uid=" + arg["parent_uid"] |
|
|
} else if arg["uid"] != "" { |
|
|
} else if arg["uid"] != "" { |
|
|