package com.bcrjl.miwifi.common.util;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bcrjl.miwifi.common.response.Query;

/**
 * @author yanqs
 */
public class Condition {
    /**
     * 转化成mybatis plus中的Page
     *
     * @param query 查询条件
     * @return IPage
     */
    public static <T> IPage<T> getPage(Query query) {
        Page<T> page = new Page<>(query.getPage(), query.getPageSize());
        return page;
    }
}
