liulin
2025-07-04 5e388cfb25b24a154e28b3c42143493fc77f8e56
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package com.lunhan.water.service;
 
import com.lunhan.water.common.ConstantFactory;
import com.lunhan.water.common.util.NumericUtil;
import com.lunhan.water.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);
        }
    }
}