diff --git a/src/main/java/org/ntlab/nemophila/resources/shops/ShopRest.java b/src/main/java/org/ntlab/nemophila/resources/shops/ShopRest.java index 8484928..538bd22 100644 --- a/src/main/java/org/ntlab/nemophila/resources/shops/ShopRest.java +++ b/src/main/java/org/ntlab/nemophila/resources/shops/ShopRest.java @@ -1,5 +1,7 @@ package org.ntlab.nemophila.resources.shops; +import org.ntlab.nemophila.models.shops.Shop; +import org.ntlab.nemophila.models.shops.ShopManager; import org.springframework.stereotype.Component; import javax.ws.rs.*; @@ -9,44 +11,16 @@ @Component @Path("/shops") public class ShopRest { + @GET - 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) { + @Produces(MediaType.APPLICATION_JSON) + public String getID(@PathParam("sid") String sid) { + ShopManager sm = ShopManager.getInstance(); + Shop shop = sm.getShop(sid); + return null; } + + } \ No newline at end of file