๊ฐœ๋ฐœ์ผ์ง€-27 [๐Ÿ ๊ฐ€๊ฒŒ๋„๋ฉ”์ธ(๊ตฌ๋งค์ž): ๊ฐ€๊ฒŒ's ์ •๋ณด ์กฐํšŒ]

๊น€์„ฑ์ธยท2023๋…„ 9์›” 22์ผ
0

๊ฐ€๊ฒŒ ๋„๋ฉ”์ธ(๊ตฌ๋งค์ž) ๊ธฐ๋Šฅ ์ •์˜ ํฌ์ŠคํŒ…


์ง€๋„์—์„œ ๊ฐ€๊ฒŒ ์กฐํšŒ ํ™”๋ฉด


1. [GET] /jat/app/store/address

์ง€๋„ ํ™”๋ฉด ๋‚ด์— ๋“ฑ๋ก๋œ ๊ฐ€๊ฒŒ ๋ชฉ๋ก์„ ์กฐํšŒ

์•ฑ ์‹œ์ž‘์‹œ ๋ฉ”์ธ ํ™”๋ฉด, ํ˜„์žฌ ์ง€๋„์˜ ์ตœ๋Œ€ ์œ„/๊ฒฝ๋„๋ฅผ ๊ธฐ์ค€์œผ๋กœ ํ™•์ธ.

  • ์‘๋‹ต ๋ฐ”๋””
  • ์ปจํŠธ๋กค๋Ÿฌ
    • ํ”„๋ก ํŠธ์—์„œ ์ง€๋„ API๋ฅผ ์—ฐ๋™ํ•˜๊ณ , ํ•ด๋‹น ์ง€๋„ ํ™”๋ฉด์„ ๊ธฐ์ค€์œผ๋กœ ์ตœ๋Œ€ ์œ„/๊ฒฝ๋„๋ฅผ ๊ฐ™์ด ์š”์ฒญํ•œ๋‹ค.
  • ์„œ๋น„์Šค
    public List<StoreListXY> getStoreListByAddr(double maxX, double maxY, double minX, double minY) throws BaseException {
        //{minX, maxX, minY, maxY}
        double[] aroundXY = new double[]{minX, maxX, minY, maxY};

        // ์ฃผ๋ณ€ ๋ฐ˜๊ฒฝ ๋‚ด ํ˜„์žฌ ์ขŒํ‘œ๋กœ ๊ฐ€๊ฒŒ ์กฐํšŒ
        try{
            List<StoreListXY> storeListXY = appStoreDao.getStoreListByAddr(aroundXY);
            return storeListXY;
        }catch (Exception e) {
            throw new BaseException(DATABASE_ERROR);
        }
    }
  • Dao
// ํŒ๋งค์ž๊ฐ€ ๊ฐ€๊ฒŒ ๋“ฑ๋ก์‹œ ์ž๋™ ํ• ๋‹น ๋˜์—ˆ๋˜ ๊ฐ€๊ฒŒ์ฃผ์†Œ์˜ ์œ„์น˜(๊ฒฝ/์œ„๋„) ์ขŒํ‘œ๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์กฐํšŒํ•œ๋‹ค.
// ๊ฐ€๊ฒŒ์˜ ์นดํ…Œ๊ณ ๋ฆฌ๋„ ๊ฐ™์ด ๊ฐ€์ ธ์™€์„œ ์•„์ด์ฝ˜์˜ ๋ชจ์–‘์„ ๊ฒฐ์ •์ง€์–ด์คŒ.
    public List<StoreListXY> getStoreListByAddr(double[] aroundXY) {
        String query = "SELECT\n" +
                "    storeIdx,\n" +
                "    S.categoryIdx,\n" +
                "    store_name,\n" +
                "    store_address,\n" +
                "    x,y\n" +
                "FROM Stores S\n" +
                "LEFT JOIN StroeCategories SC on S.categoryIdx = SC.categoryIdx\n" +
                "WHERE x BETWEEN ? AND ?\n" +
                "AND y BETWEEN ? AND ?";

        //aroundXY = {minX, maxX, minY, maxY}
        Object[] params = new Object[]{aroundXY[0],aroundXY[1],aroundXY[2],aroundXY[3]};
        return this.jdbcTemplate.query(query,
                (rs, rowNum) -> new StoreListXY(
                        rs.getInt("storeIdx"),
                        rs.getInt("categoryIdx"),
                        rs.getString("store_name"),
                        rs.getString("store_address"),
                        rs.getDouble("x"),
                        rs.getDouble("y")
                ), params);
        }

ํ…Œ์ŠคํŠธ


2. [GET] /jat/app/stores/preview

๊ฐ€๊ฒŒ ์•„์ด์ฝ˜ ํด๋ฆญ ์‹œ ๊ฐ€๊ฒŒ ๋ฏธ๋ฆฌ๋ณด๊ธฐ ์ •๋ณด

  • ์‘๋‹ต ๋ฐ”๋””
  • ์ปจํŠธ๋กค๋Ÿฌ
    • ๊ฐ€๊ฒŒ ์•„์ด์ฝ˜ ๋ชฉ๋ก์„ ์‘๋‹ต์œผ๋กœ ๋ณด๋‚ด์ค„๋•Œ ๋„ฃ์–ด๋†จ๋–ค storeIdx๋ฅผ ๊ฐ€์ง€๊ณ  ์„ ํƒํ•œ ๊ฐ€๊ฒŒ์˜ ๋ฏธ๋ฆฌ๋ณด๊ธฐ๋ฅผ ํ™•์ธ
  • ์„œ๋น„์Šค
    • ์›๋ž˜๋Š” ํ•ด๋‹น๊ฐ€๊ฒŒ + 2๊ฐœ ๋” ๋ฏธ๋ฆฌ๋ณด๊ธฐ ์ •๋ณด๋ฅผ ์ถ”๊ฐ€ํ•˜๋ คํ–ˆ์ง€๋งŒ, ํ”„๋ก ํŠธ์—์„œ ํ•˜๋‚˜๋งŒ ํ•˜์ž๊ณ  ํ•ด์„œ ํ•˜๋‚˜๋งŒ ๋งŒ๋“ค๊ธฐ๋กœ ํ•จ (๋‚˜๋จธ์ง€ 2๊ฐœ ๋” ๋„ฃ๋Š” ๊ณผ์ •์€ ์ง€์›€)
    public List<StorePreviewRes> getStorePreview(int customerIdx, int storeIdx, Double longitude, Double latitude) throws BaseException{
        // 2. ์„ ํƒํ•œ ๊ฐ€๊ฒŒ ๋ฏธ๋ฆฌ๋ณด๊ธฐ ์ •๋ณด ์ผ๋‹จ ๊ฐ€์ ธ์˜ค๊ธฐ
        StorePreviewDetails storePreview;
        try{
            storePreview = appStoreDao.getStorePreview(storeIdx);
        }catch (Exception e) {
            throw new BaseException(DATABASE_ERROR);
        }

        // ์„ ํƒํ•œ ๊ฐ€๊ฒŒ ๊นŒ์ง€ ํฌํ•จํ•˜๊ธฐ๊ธฐ
        aroundStoreList.add(0, storePreview);

        // 4. ๋ฐ˜ํ™˜ํ•  ๋ฏธ๋ฆฌ๋ณด๊ธฐ ์ •๋ณด ๋งŒ๋“ค๊ธฐ
        List<StorePreviewRes> storePreviewRes = new ArrayList<>();
        for(StorePreviewDetails prevDetail : aroundStoreList){
            // ๊ฐ€๊ฒŒ ์‚ฌ์ง„ URL
            if(prevDetail.getStoreLogoUrl() != null && prevDetail.getStoreLogoUrl().length() != 0){
                prevDetail.setStoreLogoUrl(""+s3Client.getUrl(bucketName, prevDetail.getStoreLogoUrl()));
            }

            if(prevDetail.getStoreSignUrl() != null && prevDetail.getStoreSignUrl().length() != 0){
                prevDetail.setStoreSignUrl(""+s3Client.getUrl(bucketName, prevDetail.getStoreSignUrl()));
            }
            // ๊ฐ€๊ฒŒํ‰์ 
            double star = 0;
            try {
                star = appStoreDao.getStoreStar(prevDetail.getStoreIdx());
            }catch(NullPointerException nullerr){
                star = 0;
            }catch (IncorrectResultSizeDataAccessException error) { // ์ฟผ๋ฆฌ๋ฌธ์— ํ•ด๋‹นํ•˜๋Š” ๊ฒฐ๊ณผ๊ฐ€ ์—†๊ฑฐ๋‚˜ 2๊ฐœ ์ด์ƒ์ผ ๋•Œ
                star = 0;
            }

            // ** ๋‚ด ์œ„์น˜์—์„œ ํ•ด๋‹น ๊ฐ€๊ฒŒ๊นŒ์ง€์˜ ๊ฑฐ๋ฆฌ **
            int distance = (int) locationValue.getDistance(latitude, longitude, prevDetail.getY(), prevDetail.getX());

            // 1Km (1000M) 16๋ถ„ ํ‰๊ตฐ ์†Œ์š”
            // 100M : 1๋ถ„ 36์ดˆ(96์ดˆ) ,  10M : 9.6์ดˆ
            // ๊ฑฐ๋ฆฌ / 100M * 96์ดˆ / 1๋ถ„ =
            int duration = locationValue.getDuration(distance); // ๋ถ„

            // ๊ตฌ๋… ์—ฌ๋ถ€(์˜ˆ์™ธ์ฒ˜๋ฆฌ ๋‚˜์ค‘์— ์ œ๋Œ€๋กœ ํ• ๊ฒƒ, EXISTS ์จ์„œ null ์˜ˆ์™ธ ์ฒ˜๋ฆฌ ์•ˆํ•ด๋„๋ ์ˆ˜๋„?)
            int subscribed;
            try{
                subscribed = appStoreDao.getStoreSubscribed(customerIdx, prevDetail.getStoreIdx());
            }catch (IncorrectResultSizeDataAccessException error) { // ์ฟผ๋ฆฌ๋ฌธ์— ํ•ด๋‹นํ•˜๋Š” ๊ฒฐ๊ณผ๊ฐ€ ์—†๊ฑฐ๋‚˜ 2๊ฐœ ์ด์ƒ์ผ ๋•Œ
                subscribed  = 0;
            }catch(Exception e){
                throw new BaseException(DATABASE_ERROR);
            }

            StorePreviewRes prevRes = new StorePreviewRes(
                    prevDetail.getStoreIdx(),
                    prevDetail.getStoreName(),
                    prevDetail.getStoreLogoUrl(),
                    prevDetail.getStoreSignUrl(),
                    star, distance, duration, subscribed
            );

            storePreviewRes.add(prevRes);
        }

        return storePreviewRes;
    }
  1. ๊ฐ€๊ฒŒ ์ •๋ณด์˜ ๋ฏธ๋ฆฌ๋ณด๊ธฐ ๊ธฐ๋ณธ์ •๋ณด๋ฅผ ๊ฐ€์ ธ์˜จ๋‹ค.
  2. ๋ฐ˜ํ™˜ํ•  ๋ฏธ๋ฆฌ ๋ณด๊ธฐ ์ •๋ณด๋ฅผ ๊ฐ€๊ณตํ•จ
    2-1. ๊ฐ€๊ฒŒ ์‚ฌ์ง„ URL ๋งŒ๋“ค๊ธฐ S3์—์„œ ์กฐํšŒ
    2-2. ๊ฐ€๊ฒŒ ํ‰์  ์กฐํšŒ
    2-3. queryParam์œผ๋กœ ๋ฐ›์€ ์œ„/๊ฒฝ๋„์™€ ๊ฐ€๊ฒŒ์˜ ์œ„/๊ฒฝ๋„๋ฅผ ์ด์šฉํ•˜์—ฌ ๊ฑฐ๋ฆฌ ๊ณ„์‚ฐํ•˜๊ธฐ.
    2-4. ํ•ด๋‹น ๊ฐ€๊ฒŒ์— ๊ตฌ๋งค์ž์˜ ๊ตฌ๋… ์—ฌ๋ถ€๋ฅผ ํ™•์ธ
  3. ๋ฐ์ดํ„ฐ ๋งŒ๋“  ํ›„ ์ž˜ ์‘๋‹ตํ•˜๊ธฐ.
    public double getDistance(double lat1, double lon1, double lat2, double lon2) {
        double dLat = Math.toRadians(lat2 - lat1); // latitude : ์œ„๋„ y
        double dLon = Math.toRadians(lon2 - lon1); // longtitude : ๊ฒฝ๋„ x

        double a = Math.sin(dLat/2)
                * Math.sin(dLat/2)
                + Math.cos(Math.toRadians(lat1))
                * Math.cos(Math.toRadians(lat2))
                * Math.sin(dLon/2)* Math.sin(dLon/2);

        double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
        double d = EARTH_RADIUS* c * 1000;    // Distance with m
        return d;
    }
    public int getDuration(int distance){
        // 1Km (1000M) 16๋ถ„ ํ‰๊ตฐ ์†Œ์š”
        // 100M : 1๋ถ„ 36์ดˆ(96์ดˆ) ,  10M : 9.6์ดˆ
        // ๊ฑฐ๋ฆฌ / 100M * 96์ดˆ / 1๋ถ„ =
        return distance / 100 * 96 / 60;
    }
  • Dao
// ๊ฐ€๊ฒŒ ๋ฏธ๋ฆฌ๋ณด๊ธฐ ๊ธฐ๋ณธ ์ •๋ณด(๊ฐ€๊ฒŒid, ๊ฐ€๊ฒŒ์ด๋ฆ„, ๊ฐ€๊ฒŒ ๋กœ๊ณ /์‚ฌ์ง„ (s3 ๊ฐ์ฒด ํ‚ค), ์œ„/๊ฒฝ๋„
    public StorePreviewDetails getStorePreview(int storeIdx) {
        String query = "SELECT\n" +
                "    storeIdx,\n" +
                "    store_name,\n" +
                "    store_logo_url,\n" +
                "    sign_url,\n" +
                "    x, y\n" +
                "FROM Stores\n" +
                "WHERE storeIdx= ?";
        return this.jdbcTemplate.queryForObject(query,
                (rs, rowNum) -> new StorePreviewDetails(
                        rs.getInt("storeIdx"),
                        rs.getString("store_name"),
                        rs.getString("store_logo_url"),
                        rs.getString("sign_url"),
                        rs.getDouble("x"),
                        rs.getDouble("y")
                ), storeIdx);
    }
// ๊ฐ€๊ฒŒ ํ‰์  ๊ตฌํ•˜๊ธฐ
    public double getStoreStar(int storeIdx) {
        String query = "SELECT\n" +
                "    ROUND(AVG(star), 1) AS star_average \n" +
                "FROM Review\n" +
                "WHERE storeIdx = ? AND status != 'D'";
        return this.jdbcTemplate.queryForObject(query,
                (rs, rowNum) -> rs.getDouble("star_average")
                , storeIdx);
    }
// ๊ฐ€๊ฒŒ ๊ตฌ๋… ์ •๋ณด ํ™•์ธ
    public int getStoreSubscribed(int customerIdx, int storeIdx) {
        String query = "SELECT EXISTS(SELECT\n" +
                "    *\n" +
                "FROM Subscribe\n" +
                "WHERE customerIdx = ? AND storeIdx = ?\n" +
                "AND status != 'D')";

        Object[] params = new Object[]{customerIdx, storeIdx};

        return this.jdbcTemplate.queryForObject(query, int.class, params);
    }

ํ…Œ์ŠคํŠธ

๊ตฌ๋งค์ž ๋กœ๊ทธ์ธ ID: dpranger, PW: @bcde12345, ์ด๋ฆ„: ์•ˆ์ค€ํ˜ธ

์ขŒํ‘œ๊ธฐ์ค€: ๋‚ด ์ง‘๊ทผ์ฒ˜์ธ ๋‹ค์šด ํŒŒ์ถœ์†Œ ~ ์ง€๋‚œ๋ฒˆ ๊ฐ€๊ฒŒ ๋“ฑ๋ก์„ ํ•œ ๋šœ๋ ˆ์ฃผ๋ฅด๋ฅผ ํ•œ๋ฒˆ API๋กœ ๋ฏธ๋ฆฌ ๋ณด๊ธฐ ์กฐํšŒ๋ฅผ ํ•ด๋ณด๊ฒ ๋‹ค.
๊ฑฐ๋ฆฌ์™€ ๊ฑธ๋ฆฌ๋Š”์‹œ๊ฐ„์ด ๋„ค์ด๋ฒ„ ์ง€๋„์— ๋‚˜์˜ค๋Š”๊ฒƒ๊ณผ ๊ฑฐ์˜ ๋น„์Šทํ•จ!


3. [GET] /jat/app/stores

์‹๋‹น ๋ชฉ๋ก๋ณด๊ธฐ

์•„๊นŒ๋Š” ์„ ํƒํ•œ ๊ฐ€๊ฒŒ ์•„์ด์ฝ˜์— ๋Œ€ํ•œ ํ•˜๋‚˜์˜ ๋ฏธ๋ฆฌ๋ณด๊ธฐ์˜€์ง€๋งŒ, ํ˜„์žฌ ๋‚ด ์œ„์น˜๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๊ฐ€๊ฒŒ ๋ชฉ๋ก์„ ํ™•์ธํ•œ๋‹ค.
๋ฏธ๋ฆฌ๋ณด๊ธฐ๊ฐ€ ์—ฌ๋Ÿฌ ๊ฐœ์ธ ๋ชฉ๋ก ํ™”๋ฉด..!

  • ์‘๋‹ต ๋ฐ”๋””
    [GET] 2. /jat/app/stores/preview ์™€ ๊ฐ™์Œ
  • ์ปจํŠธ๋กค๋Ÿฌ
    ์‚ฌ์šฉ์ž์˜ ์œ„๋„/๊ฒฝ๋„๋ฅผ ์„œ๋ฒ„์— ์ €์žฅํ•˜๋Š”๊ฒƒ๋„ ๊ณ ๋ฏผํ•ด๋ณด์•˜์ง€๋งŒ, ์ง€๋„๋‚˜ ์›€์ง์ด๋Š” ์œ„์น˜์— ๋”ฐ๋ผ ์œ„์น˜ ์ •๋ณด๊ฐ€ ๊ณ„์† ๋ฐ”๋€Œ์–ด์„œ ์ฟผ๋ฆฌํŒŒ๋žŒ์œผ๋กœ ์š”์ฒญํ•˜๋Š”๊ฒŒ ๋” ๋‚ซ๋‹ค๊ณ  ์ƒ๊ฐํ–ˆ๋‹ค.
  • ์„œ๋น„์Šค
    public List<StorePreviewRes> getAppStoreList(int userIdx, Double longitude, Double latitude) throws BaseException {
        // 1. ์ฃผ๋ณ€ ๋ฐ˜๊ฒฝ ๊ตฌํ•˜๊ธฐ (1500๋ฏธํ„ฐ)
        //{minX, maxX, minY, maxY}
        double[] aroundXY = locationValue.aroundDist(longitude, latitude, 1500);

        // 2. ์ฃผ๋ณ€ ๊ฐ€๊ฒŒ ๋ชฉ๋ก ๊ฐ€์ ธ์˜ค๊ธฐ
        // ๊ฐ€๊ฒŒIdx, ๊ฐ€๊ฒŒ์ด๋ฆ„, ๊ฐ€๊ฒŒ์ฃผ์†Œ, ์ขŒํ‘œ
        // ๋ณ„์ , ๊ตฌ๋…์—ฌ๋ถ€
        List<GetStoreList> storeList;
        try {
            storeList = appStoreDao.getAppStoreList(userIdx, aroundXY);
        } catch (Exception e) {
            throw new BaseException(RESPONSE_ERROR);
        }

        // 3. URL, ๊ฐ€๊ฒŒ๊นŒ์ง€ ๊ฑฐ๋ฆฌ ๊ตฌํ•˜๊ธฐ
        List<StorePreviewRes> storePreviewRes = new ArrayList<>();
        for(GetStoreList store : storeList){
            // ๊ฐ€๊ฒŒ ์‚ฌ์ง„ URL
            if(store.getStoreLogoUrl() != null && store.getStoreLogoUrl().length() != 0){
                store.setStoreLogoUrl(""+s3Client.getUrl(bucketName, store.getStoreLogoUrl()));
            }
            if(store.getStoreSignUrl() != null && store.getStoreSignUrl().length() != 0){
                store.setStoreSignUrl(""+s3Client.getUrl(bucketName, store.getStoreSignUrl()));
            }

            // ** ๋‚ด ์œ„์น˜์—์„œ ํ•ด๋‹น ๊ฐ€๊ฒŒ๊นŒ์ง€์˜ ๊ฑฐ๋ฆฌ **
            int distance = (int) locationValue.getDistance(latitude, longitude, store.getY(), store.getX());

            // 1Km (1000M) 16๋ถ„ ํ‰๊ตฐ ์†Œ์š”
            // 100M : 1๋ถ„ 36์ดˆ(96์ดˆ) ,  10M : 9.6์ดˆ
            // ๊ฑฐ๋ฆฌ / 100M * 96์ดˆ / 1๋ถ„ =
            int duration = locationValue.getDuration(distance); // ๋ถ„

            storePreviewRes.add(
                    new StorePreviewRes(
                            store.getStoreIdx(),
                            store.getStoreName(),
                            store.getStoreLogoUrl(),
                            store.getStoreSignUrl(),
                            store.getStar(),
                            distance, duration,
                            store.getCustomerIdx() != 0 ? 1:0
                    )
            );
        }

        return storePreviewRes;
    }
  1. ๋‚ด ํ˜„์žฌ ์œ„์น˜ ๊ธฐ์ค€ ์ง์„ ๊ฑฐ๋ฆฌ ์•ฝ 1500๋ฏธํ„ฐ ์ฃผ๋ณ€์„ ๊ธฐ์ค€์œผ๋กœ ์ตœ๋Œ€/์ตœ์†Œ ์œ„/๊ฒฝ๋„๋ฅผ ๊ตฌํ•˜๊ธฐ.
  2. [GET] /jat/app/stores ์—์„œ ์‚ฌ์šฉํ–ˆ๋˜ ๋ฐฉ๋ฒ•๊ณผ ๊ฐ™์ด ์ตœ๋Œ€,์ตœ์†Œ ์œ„/๊ฒฝ๋„๋ฅผ ์ด์šฉํ•ด ๊ฐ€๊ฒŒ๋ฅผ ์กฐํšŒํ•˜๊ธฐ
  3. ๊ฐ ๊ฐ€๊ฒŒ์˜ URL ์ฃผ์†Œ๋ฅผ S3๋ฅผ ํ†ตํ•ด์„œ ๊ฐ€์ ธ์˜ค๊ณ ,
  4. ๊ฐ ๊ฐ€๊ฒŒ๊นŒ์ง€์˜ ๊ฑฐ๋ฆฌ๋ฅผ ๋‚ด ํ˜„์žฌ ์œ„์น˜๊ธฐ์ค€์„ ํ†ตํ•ด์„œ ๊ตฌํ•˜์—ฌ ์‘๋‹ต๊ฐ’์œผ๋กœ ๋งŒ๋“ค๊ธฐ.
  • dao
// ์ตœ๋Œ€, ์ตœ์†Œ ์œ„/๊ฒฝ๋„๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์กฐํšŒ
// ๊ฑฐ๋ฆฌ ์ˆœ์œผ๋กœ ์กฐํšŒํ• ๋ ค ํ–ˆ๋Š”๋ฐ ์‹คํŒจํ•จ.. ๊ทธ๋ž˜๋„ ์ง„ํ–‰์ค‘
    public List<GetStoreList> getAppStoreList(int userIdx, double[] aroundXY) {
        String query = "SELECT\n" +
                "    S.storeIdx,\n" +
                "    store_name,\n" +
                "    store_logo_url,\n" +
                "    sign_url,\n" +
                "    store_address,\n" +
                "    x, y,\n" +
                "    ROUND(AVG(star), 1) as star,\n" +
                "    SUB.customerIdx\n" +
                "FROM Stores S\n" +
                "LEFT JOIN Review R on S.storeIdx = R.storeIdx AND R.status != 'D'\n" +
                "LEFT JOIN Subscribe SUB on S.storeIdx = SUB.storeIdx AND SUB.status != 'D' AND SUB.customerIdx = ?\n" +
                "WHERE x BETWEEN ? AND ?\n" +
                "AND y BETWEEN ? AND ?\n" +
                "GROUP BY (S.storeIdx)\n" +
                "ORDER BY ABS(?+?/2 - x) DESC , ABS(?+?/2 - y) DESC ;";

        Object[] params = new Object[]{
                userIdx,
                aroundXY[0], aroundXY[1],
                aroundXY[2], aroundXY[3],
                aroundXY[1], aroundXY[0],
                aroundXY[3], aroundXY[2],
        };

        return this.jdbcTemplate.query(query,
                (rs, rowNum) -> new GetStoreList(
                        rs.getInt("storeIdx"),
                        rs.getString("store_name"),
                        rs.getString("store_logo_url"),
                        rs.getString("sign_url"),
                        rs.getString("store_address"),
                        rs.getDouble("x"),
                        rs.getDouble("y"),
                        rs.getDouble("star"),
                        rs.getInt("customerIdx")
                ), params);

    }

ํ…Œ์ŠคํŠธ

0๊ฐœ์˜ ๋Œ“๊ธ€