Skip to content

Commit

Permalink
hotfix: 리크루트 페이징 객체 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
khs960616 committed Oct 26, 2023
1 parent a4f493f commit 37a37b4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
package com.ssafy.ssafsound.domain.recruit.dto;

import lombok.Getter;
import lombok.Setter;

import net.minidev.json.annotate.JsonIgnore;
import org.springframework.data.domain.PageRequest;

@Getter
@Setter
public class RecruitOffsetPagingRequestDto {

protected Integer page;
protected Integer size;

@JsonIgnore
public PageRequest getPageRequest() {
int page = (this.page != null && this.page >= 0) ? this.page-1 : 0;
int page = (this.page != null && this.page > 0) ? this.page-1 : 0;
int size = this.size == null ? 10 : this.size;
return PageRequest.of(page, size);
}
Expand Down

0 comments on commit 37a37b4

Please sign in to comment.