Skip to content

Commit

Permalink
[feature/Inhabas#252] 내가 쓴 글 및 예산청관리 dto,service,repo 구현 완료
Browse files Browse the repository at this point in the history
  • Loading branch information
skytin1004 committed Mar 19, 2024
1 parent 34dc52e commit 3380b24
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ public class BudgetSupportApplication extends BaseBoard {
@Column(name = "DATE_CHECKED", columnDefinition = "DATETIME(0)")
private LocalDateTime dateChecked;

@Column(name = "DATE_DEPOSITED", columnDefinition = "DATETIME(0)")
private LocalDateTime dateDeposited;

public String getDetails() {
return details.getValue();
}
Expand Down Expand Up @@ -151,6 +154,7 @@ public void reject(String reason, Member memberInCharge) {
public void complete(Member memberInCharge) {
if (this.isApproved()) {
this.status = RequestStatus.COMPLETED;
this.dateDeposited = LocalDateTime.now();
this.memberInCharge = memberInCharge;
} else {
throw new StatusNotFollowProceduresException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,12 @@ public class MyBudgetSupportApplicationDto {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss")
@Schema(type = "string", example = "2024-11-01T00:00:00")
private LocalDateTime dateCreated;

@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss")
@Schema(type = "string", example = "2024-11-01T00:00:00")
private LocalDateTime dateChecked;

@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss")
@Schema(type = "string", example = "2024-11-01T00:00:00")
private LocalDateTime dateDeposited;
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public List<MyPostsDto> findAllBoardsByMemberId(Long memberId) {
Projections.constructor(
MyPostsDto.class,
baseBoard.id,
baseBoard.menu.id,
baseBoard.menu.name.value,
baseBoard.title.value,
baseBoard.dateCreated))
Expand All @@ -42,6 +43,7 @@ public List<MyCommentsDto> findAllCommentsByMemberId(Long memberId) {
Projections.constructor(
MyCommentsDto.class,
comment.parentBoard.id,
comment.parentBoard.menu.id,
comment.parentBoard.menu.name.value,
comment.content.value,
comment.dateCreated))
Expand All @@ -60,7 +62,8 @@ public List<MyBudgetSupportApplicationDto> findAllBudgetSupportAllpicationByMemb
MyBudgetSupportApplicationDto.class,
budgetSupportApplication.status,
budgetSupportApplication.title.value,
budgetSupportApplication.dateCreated))
budgetSupportApplication.dateCreated,
budgetSupportApplication.dateChecked))
.from(budgetSupportApplication)
.where(budgetSupportApplication.applicant.id.eq(memberId))
.orderBy(budgetSupportApplication.dateCreated.desc())
Expand Down

0 comments on commit 3380b24

Please sign in to comment.