-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
244 additions
and
226 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
25 changes: 25 additions & 0 deletions
25
src/main/java/com/sparta/binplay/dto/MonthlyTotalAmountDto.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,25 @@ | ||
package com.sparta.binplay.dto; | ||
|
||
import lombok.*; | ||
|
||
import java.math.BigDecimal; | ||
import java.util.List; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Builder | ||
public class MonthlyTotalAmountDto { | ||
private BigDecimal totalVideoAmountForMonth; | ||
private BigDecimal totalAdAmountForMonth; | ||
private BigDecimal totalAmountForMonth; | ||
private List<VideoAmountDto> videoSummaries; | ||
|
||
public MonthlyTotalAmountDto(BigDecimal totalVideoAmountForMonth, BigDecimal totalAdAmountForMonth, List<VideoAmountDto> videoSummaries) { | ||
this.totalVideoAmountForMonth = totalVideoAmountForMonth; | ||
this.totalAdAmountForMonth = totalAdAmountForMonth; | ||
this.totalAmountForMonth = totalVideoAmountForMonth.add(totalAdAmountForMonth); | ||
this.videoSummaries = videoSummaries; | ||
} | ||
} |
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,32 @@ | ||
package com.sparta.binplay.dto; | ||
|
||
import lombok.*; | ||
|
||
import java.math.BigDecimal; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Builder | ||
public class VideoAmountDto { | ||
private String videoId; | ||
private BigDecimal videoAmount; | ||
private BigDecimal adAmount; | ||
|
||
// 비디오 금액을 더하는 메서드 | ||
public VideoAmountDto addVideoAmount(BigDecimal amount) { | ||
this.videoAmount = this.videoAmount.add(amount); | ||
return this; // 메서드 체이닝을 위해 반환 | ||
} | ||
|
||
// 광고 금액을 더하는 메서드 | ||
public VideoAmountDto addAdAmount(BigDecimal amount) { | ||
this.adAmount = this.adAmount.add(amount); | ||
return this; // 메서드 체이닝을 위해 반환 | ||
} | ||
|
||
public BigDecimal getTotalAmount() { | ||
return videoAmount.add(adAmount); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/com/sparta/binplay/dto/WeeklyTotalAmountDto.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,25 @@ | ||
package com.sparta.binplay.dto; | ||
|
||
import lombok.*; | ||
|
||
import java.math.BigDecimal; | ||
import java.util.List; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Builder | ||
public class WeeklyTotalAmountDto { | ||
private BigDecimal totalVideoAmountForWeek; | ||
private BigDecimal totalAdAmountForWeek; | ||
private BigDecimal totalAmountForWeek; | ||
private List<VideoAmountDto> videoSummaries; | ||
|
||
public WeeklyTotalAmountDto(BigDecimal totalVideoAmountForWeek, BigDecimal totalAdAmountForWeek, List<VideoAmountDto> videoSummaries) { | ||
this.totalVideoAmountForWeek = totalVideoAmountForWeek; | ||
this.totalAdAmountForWeek = totalAdAmountForWeek; | ||
this.totalAmountForWeek = totalVideoAmountForWeek.add(totalAdAmountForWeek); | ||
this.videoSummaries = videoSummaries; | ||
} | ||
} |
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.