File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed
src/main/java/com/company/project/core Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -22,31 +22,26 @@ public class Page implements Serializable {
2222 private Integer pageSize ;
2323
2424 public Integer getPageNum () {
25- return isNullSetDeault (pageNum , 1 );
25+ if (this .pageNum == null ) {
26+ this .pageNum = 1 ;
27+ }
28+ return pageNum ;
2629 }
2730
2831 public void setPageNum (Integer pageNum ) {
2932 this .pageNum = pageNum ;
3033 }
3134
3235 public Integer getPageSize () {
33- return isNullSetDeault (pageSize , 10 );
36+ if (this .pageSize == null ) {
37+ this .pageSize = 10 ;
38+ }
39+ return pageSize ;
3440 }
3541
3642 public void setPageSize (Integer pageSize ) {
3743 this .pageSize = pageSize ;
3844 }
3945
40- /**
41- * 如何分页信息为null则设置分页信息的默认值
42- * @param num
43- * @param i
44- * @return
45- */
46- private Integer isNullSetDeault (Integer num , int i ) {
47- if (num == null ) {
48- num = i ;
49- }
50- return num ;
51- }
46+
5247}
You can’t perform that action at this time.
0 commit comments