Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

협업지점 조회 API 버그 #399

Closed
birdieHyun opened this issue Dec 16, 2023 · 0 comments
Closed

협업지점 조회 API 버그 #399

birdieHyun opened this issue Dec 16, 2023 · 0 comments
Assignees
Labels
fix 버그 수정

Comments

@birdieHyun
Copy link
Member

birdieHyun commented Dec 16, 2023

 @Override
    public List<StoreMetaWithUmbrellaCount> findAllStoresByClassification(long classificationId) {

        QStoreMetaWithUmbrellaCount storeMetaWithUmbrellaCount = new QStoreMetaWithUmbrellaCount(
                storeMeta,
                umbrella.id.countDistinct().as("rentableUmbrellasCount")
        );


        return queryFactory
                .select(storeMetaWithUmbrellaCount)
                .from(umbrella)
                .rightJoin(umbrella.storeMeta, storeMeta)
                .leftJoin(storeMeta.classification, classification).fetchJoin()
                .where(storeMeta.deleted.eq(false)
                        .and(storeMeta.classification.id.eq(classificationId)))
//                        .and(umbrella.rentable.eq(true))
//                        .and(umbrella.missed.eq(false))
//                        .and(umbrella.deleted.eq(false)))
                .distinct()
                .groupBy(storeMeta)
                .fetch();
    }

and 부분에서 우산이 없을 경우 조회가 안되는 것 같습니다.

{
"status": "success",
"code": 200,
"message": "대분류 기준 가게 조회 성공",
"data": {
"stores": [
{
"id": 281,
"name": "모티브 스터디카페",
"openStatus": true,
"latitude": 37.5578586447476,
"longitude": 126.938886004379,
"rentableUmbrellasCount": 2
},
{
"id": 282,
"name": "아다르커피",
"openStatus": false,
"latitude": 37.5584101738249,
"longitude": 126.935386322022,
"rentableUmbrellasCount": 2
},
{
"id": 283,
"name": "에이투지 카페",
"openStatus": true,
"latitude": 37.557698240344,
"longitude": 126.938314479638,
"rentableUmbrellasCount": 2
}
]
}
}

DB 상에는 classificationId 553 에 해당하는 storeMeta가 5개인데, 실제 조회되는 협업지점은 3개입니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix 버그 수정
Projects
None yet
Development

No branches or pull requests

1 participant