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);
|
}
|
}
|
}
|