-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #445 from TrandPick/development
메인 브랜치로 병합
- Loading branch information
Showing
93 changed files
with
1,624 additions
and
976 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
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,21 +1,8 @@ | ||
# Stage 1: Pinpoint setup | ||
# FROM alpine:3.14 as pinpoint-setup | ||
# WORKDIR /usr/local | ||
# ADD https://github.com/pinpoint-apm/pinpoint/releases/download/v2.5.2/pinpoint-agent-2.5.2.tar.gz /usr/local | ||
# RUN tar -zxvf pinpoint-agent-2.5.2.tar.gz && \ | ||
# sed -i 's/profiler.transport.grpc.collector.ip=127.0.0.1/profiler.transport.grpc.collector.ip=10.41.183.156/g' pinpoint-agent-2.5.2/pinpoint-root.config && \ | ||
# sed -i 's/profiler.collector.ip=127.0.0.1/profiler.collector.ip=10.41.183.156/g' pinpoint-agent-2.5.2/pinpoint-root.config | ||
|
||
# Stage 2: Build final image | ||
FROM openjdk:17-jdk-alpine | ||
WORKDIR /app | ||
# COPY --from=pinpoint-setup /usr/local/pinpoint-agent-2.5.2/ ./pinpoint-agent | ||
ARG JAR_FILE=build/libs/*.jar | ||
COPY ${JAR_FILE} app.jar | ||
EXPOSE 8080 | ||
ENTRYPOINT ["java","-jar", \ | ||
# "-javaagent:/app/pinpoint-agent/pinpoint-bootstrap-2.5.2.jar", \ | ||
# "-Dpinpoint.applicationName=TrendPick", \ | ||
# "-Dpinpoint.config=/app/pinpoint-agent/pinpoint-root.config", \ | ||
"-Dspring.profiles.active=prod", \ | ||
"/app/app.jar"] |
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
43 changes: 28 additions & 15 deletions
43
src/main/java/project/trendpick_pro/domain/cash/entity/CashLog.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,42 +1,55 @@ | ||
package project.trendpick_pro.domain.cash.entity; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
import lombok.experimental.SuperBuilder; | ||
import lombok.*; | ||
import project.trendpick_pro.domain.common.base.BaseTimeEntity; | ||
import project.trendpick_pro.domain.member.entity.Member; | ||
import project.trendpick_pro.domain.rebate.entity.RebateOrderItem; | ||
import project.trendpick_pro.domain.withdraw.entity.WithdrawApply; | ||
|
||
import static jakarta.persistence.FetchType.LAZY; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor | ||
@SuperBuilder | ||
@AllArgsConstructor | ||
@Builder | ||
@ToString(callSuper = true) | ||
public class CashLog { | ||
public class CashLog extends BaseTimeEntity { //돈의 흐름을 기록하기 위한 엔티티 | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "cash_log_id") | ||
private Long id; | ||
|
||
private String relTypeCode; | ||
|
||
private Long relId; | ||
|
||
@ManyToOne(fetch = LAZY) | ||
private Member member; | ||
|
||
private String store; | ||
private long price; // 변동 | ||
private Long rebateOrderItemId; | ||
private Long withDrawApplyId; | ||
|
||
@Enumerated(EnumType.STRING) | ||
private EvenType eventType; | ||
|
||
public CashLog(Long id){ | ||
this.id=id; | ||
} | ||
public enum EvenType { | ||
출금__통장입금, | ||
브랜드정산__예치금; | ||
} | ||
|
||
static public CashLog of(WithdrawApply withdrawApply){ | ||
return CashLog.builder() | ||
.withDrawApplyId(withdrawApply.getId()) | ||
.price(withdrawApply.getPrice() * -1) | ||
.store(withdrawApply.getStore()) | ||
.eventType(EvenType.출금__통장입금) | ||
.build(); | ||
} | ||
|
||
static public CashLog of(RebateOrderItem rebateOrderItem){ | ||
return CashLog.builder() | ||
.rebateOrderItemId(rebateOrderItem.getId()) | ||
.price(rebateOrderItem.calculateRebatePrice()) | ||
.store(rebateOrderItem.getSellerName()) | ||
.eventType(EvenType.브랜드정산__예치금) | ||
.build(); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -7,7 +7,5 @@ | |
@Getter | ||
@AllArgsConstructor | ||
public class CashResponse { | ||
|
||
CashLog cashLog; | ||
long newRestCash; | ||
} |
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.