-
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.
* feat : 두둥 티켓 적용 * style : 오타 수정
- Loading branch information
Showing
11 changed files
with
75 additions
and
19 deletions.
There are no files selected for viewing
28 changes: 23 additions & 5 deletions
28
...ng-Api/src/main/java/band/gosrock/api/common/aop/hostRole/HostCallTransactionFactory.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 |
---|---|---|
@@ -1,20 +1,38 @@ | ||
package band.gosrock.api.common.aop.hostRole; | ||
|
||
|
||
import lombok.RequiredArgsConstructor; | ||
import band.gosrock.api.common.UserUtils; | ||
import band.gosrock.domain.domains.event.adaptor.EventAdaptor; | ||
import band.gosrock.domain.domains.host.adaptor.HostAdaptor; | ||
import org.springframework.stereotype.Component; | ||
|
||
@RequiredArgsConstructor | ||
@Component | ||
class HostCallTransactionFactory { | ||
|
||
private final HostRoleEventTransaction hostRoleEventTransaction; | ||
private final HostRoleEventTransaction hostRoleEventWithoutTransaction; | ||
|
||
public HostCallTransactionFactory( | ||
UserUtils userUtils, | ||
HostAdaptor hostAdaptor, | ||
EventAdaptor eventAdaptor, | ||
HostRoleEventTransaction hostRoleEventTransaction, | ||
HostRoleHostTransaction hostRoleHostTransaction) { | ||
this.hostRoleEventTransaction = hostRoleEventTransaction; | ||
this.hostRoleEventWithoutTransaction = | ||
new HostRoleEventTransaction(userUtils, eventAdaptor, hostAdaptor); | ||
this.hostRoleHostTransaction = hostRoleHostTransaction; | ||
this.hostRoleHostWithoutTransaction = new HostRoleHostTransaction(userUtils, hostAdaptor); | ||
} | ||
|
||
private final HostRoleHostTransaction hostRoleHostTransaction; | ||
private final HostRoleHostTransaction hostRoleHostWithoutTransaction; | ||
|
||
public HostRoleCallTransaction getCallTransaction(FindHostFrom findHostFrom) { | ||
public HostRoleCallTransaction getCallTransaction( | ||
FindHostFrom findHostFrom, Boolean applyTransaction) { | ||
if (findHostFrom == FindHostFrom.HOST_ID) { | ||
return hostRoleHostTransaction; | ||
return applyTransaction ? hostRoleHostTransaction : hostRoleHostWithoutTransaction; | ||
} | ||
return hostRoleEventTransaction; | ||
return applyTransaction ? hostRoleEventTransaction : hostRoleEventWithoutTransaction; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,6 @@ | |
HostQualification role(); | ||
|
||
FindHostFrom findHostFrom(); | ||
|
||
boolean applyTransaction() default true; | ||
} |
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