-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Api-v0.1.6
- Loading branch information
Showing
59 changed files
with
741 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Build Batch Server | ||
on: | ||
push: | ||
tags: | ||
- Batch-v*.*.* | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java-version: [ 17 ] | ||
outputs: | ||
version: ${{ steps.get_version.outputs.BRANCH_NAME }} | ||
|
||
steps: | ||
- name: Check Out The Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.java-version }} | ||
distribution: 'corretto' | ||
|
||
- name: Get the version | ||
id: get_version | ||
run: | | ||
RELEASE_VERSION_WITHOUT_V="$(cut -d'v' -f2 <<< ${GITHUB_REF#refs/*/})" | ||
echo ::set-output name=VERSION::$RELEASE_VERSION_WITHOUT_V | ||
#테스트 수행용 도커 컴포즈 | ||
- name: Start containers | ||
run: docker-compose up -d | ||
|
||
- name: Gradle Build | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: Execute Gradle build | ||
run: ./gradlew :DuDoong-Batch:build --no-daemon | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: ./DuDoong-Batch | ||
push: true | ||
tags: | | ||
water0641/dudoong-batch:${{ steps.get_version.outputs.VERSION }} | ||
water0641/dudoong-batch:latest | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
DuDoong-Api/src/main/java/band/gosrock/api/event/service/DeleteEventUseCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package band.gosrock.api.event.service; | ||
|
||
import static band.gosrock.api.common.aop.hostRole.FindHostFrom.EVENT_ID; | ||
import static band.gosrock.api.common.aop.hostRole.HostQualification.MANAGER; | ||
|
||
import band.gosrock.api.common.aop.hostRole.HostRolesAllowed; | ||
import band.gosrock.api.event.model.dto.response.EventResponse; | ||
import band.gosrock.common.annotation.UseCase; | ||
import band.gosrock.domain.domains.event.adaptor.EventAdaptor; | ||
import band.gosrock.domain.domains.event.domain.Event; | ||
import band.gosrock.domain.domains.event.service.EventService; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
@UseCase | ||
@RequiredArgsConstructor | ||
public class DeleteEventUseCase { | ||
private final EventService eventService; | ||
private final EventAdaptor eventAdaptor; | ||
|
||
@Transactional | ||
@HostRolesAllowed(role = MANAGER, findHostFrom = EVENT_ID) | ||
public EventResponse execute(Long eventId) { | ||
final Event event = eventAdaptor.findById(eventId); | ||
return EventResponse.of(eventService.deleteEventSoft(event)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.