Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: CI Pipeline

on:
pull_request:
branches: [ "main" ,"dev"]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read

steps:

- name : Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: List project files
run: ls -l # ๋””๋ ‰ํ† ๋ฆฌ ๊ตฌ์กฐ ํ™•์ธ

- name: List meerket directory files
run: ls -l meerket # meerket ๋””๋ ‰ํ† ๋ฆฌ ๊ตฌ์กฐ ํ™•์ธ

- name: Ensure Gradlew is Executable
run: chmod +x ./meerket/gradlew # gradlew์— ์‹คํ–‰ ๊ถŒํ•œ ๋ถ€์—ฌ


- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'


# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0


- name: Clean Build with Gradle Wrapper
working-directory: ./meerket
run: ./gradlew clean build -x test --no-daemon --info

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ___
## ํ”„๋กœ์ ํŠธ ์†Œ๊ฐœ

์ค‘๊ณ  ๋ฌผํ’ˆ ์ฒ˜๋ถ„์— ๋Œ€ํ•ด ๊ณ ๋ฏผํ•˜๊ฑฐ๋‚˜ ์ œ ๊ฐ’์„ ์ฃผ๊ณ  ํŒ”๊ธฐ ์–ด๋ ค์šด ๋ฌผํ’ˆ์ด ์žˆ๋˜ ๊ฒฝํ—˜์ด ์žˆ์œผ์‹ ๊ฐ€์š”?
์ €ํฌ๊ฐ€ ๊ฐœ๋ฐœํ•˜๋ ค๋Š” ์„œ๋น„์Šค๋Š” ์ค‘๊ณ  ๊ฑฐ๋ž˜ ๊ฒฝ๋งค ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค.
์ €ํฌ๊ฐ€ ๊ฐœ๋ฐœํ•˜๋ ค๋Š” ์„œ๋น„์Šค๋Š” ์ค‘๊ณ ๋ฌผํ’ˆ ๊ฑฐ๋ž˜ ๊ฒฝ๋งค ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค.

### ๊ธฐํš ๋ฐฐ๊ฒฝ

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public List<ProductEntity> findProductsByCursor(List<Long> blockUserIds, Point c
return queryFactory
.selectFrom(qProduct)
.where(
qUserEntity.id.notIn(blockUserIds),
blockNotInCondition(blockUserIds),
withinDistance(coordinate, MAX_DISTANCE), // ๊ฑฐ๋ฆฌ ์กฐ๊ฑด (100km ์ด๋‚ด)
cursorCondition(cursor), // ์ปค์„œ ์กฐ๊ฑด
isNotDeleted(),
Expand Down Expand Up @@ -131,6 +131,14 @@ private BooleanExpression cursorCondition(Long cursor) {
return qProduct.id.lt(cursor);
}

private BooleanExpression blockNotInCondition(List<Long> blockUserIds) {
if (blockUserIds == null || blockUserIds.isEmpty()) {
return null;
}

return qProduct.user.id.notIn(blockUserIds);
}

private BooleanExpression isNotDeleted() {
return qProduct.status.ne(ProductStatus.DELETED);
}
Expand Down
Loading