diff --git a/src/main/java/org/ntlab/nemophila/resources/shops/ShopsRest.java b/src/main/java/org/ntlab/nemophila/resources/shops/ShopsRest.java index a02d831..244259f 100644 --- a/src/main/java/org/ntlab/nemophila/resources/shops/ShopsRest.java +++ b/src/main/java/org/ntlab/nemophila/resources/shops/ShopsRest.java @@ -2,14 +2,51 @@ import org.springframework.stereotype.Component; -import javax.ws.rs.GET; -import javax.ws.rs.Path; +import javax.ws.rs.*; +import javax.ws.rs.core.MediaType; +import java.util.Collection; @Component @Path("/shops") public class ShopsRest { @GET - public String getShops() { - return "Shopsだよ"; + public String getShops(@FormParam("monitor_upper_right_latitude")double urY, + @FormParam("monitor_upper_right_longitude")double urX, + @FormParam("monitor_lower_left_latitude")double llY, + @FormParam("monitor_lower_left_longitude " )double llX) { + + double x_ang = llX-urX; + double y_ang = llY-urY; + +// ShopManager sm = ShopManager.getInstance(); +// Collection shops = sm.getShops(); +// +// if ((llX > shops(lng) && urX < shops(lng))&&(llY > shops(lat) && urY < shops(lat))){ +// return Shop(sid); +// } +// return ShopManager(sid); + return null; + } + + + @POST +// @Produces(MediaType.APPLICATION_JSON) +// public ShopJson makeShops(@FormParam("shop_name") String sid, +// @FormParam("latitude") double lat, +// @FormParam("longtitude") double lng){ +// +// ShopManager sm = ShopManager.getInstance(); +// Shop shop = sm.SerchShop(sid); +// if (shop == null) { +// shop.addShop(sid); +// ShopJson sj = new ShopJson(shop); +// return Shop(sid); +// } +// return null; +// } + + @Path("/{sid}") + public String getAccount(@PathParam("sid") String sid) { + return null; } }