liulin
2024-11-24 b7a7fe6d139893108fe431cd670a74351755c223
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package com.lunhan.xxx.service;
 
import com.lunhan.xxx.common.ConstantFactory;
import com.lunhan.xxx.common.util.NumericUtil;
import com.lunhan.xxx.entity.dto.SearchBasicDTO;
 
public class BaseService {
    public void dealPager(SearchBasicDTO search) {
        if(NumericUtil.tryParseInt(search.getLimit()).compareTo(0) < 1) {
            search.setLimit(ConstantFactory.PAGE_SIZE_DEFAULT);
        }
        if(NumericUtil.tryParseInt(search.getPage()).compareTo(0) < 1) {
            search.setPage(1);
        }
    }
}