package com.ruoyi.web.modules.diagnosis.support;

import com.github.pagehelper.PageHelper;
import com.ruoyi.web.modules.diagnosis.domain.AppOnlineConsultVetQuery;

/**
 * 在线问诊兽医列表分页。
 */
public final class AppOnlineConsultPageSupport
{
    private static final int DEFAULT_PAGE_NUM = 1;

    private static final int DEFAULT_PAGE_SIZE = 20;

    private AppOnlineConsultPageSupport()
    {
    }

    public static void startPage(AppOnlineConsultVetQuery query)
    {
        int pageNum = query != null && query.getPageNum() != null ? query.getPageNum() : DEFAULT_PAGE_NUM;
        int pageSize = query != null && query.getPageSize() != null ? query.getPageSize() : DEFAULT_PAGE_SIZE;
        PageHelper.startPage(pageNum, pageSize).setReasonable(true);
    }
}
