package com.dxhy.vo;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dxhy.api.model.config.UserInfo;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

/**
 * @author user
 */
@SuppressWarnings("rawtypes")
@Data
public class CommonDTO implements Serializable {
    private String dbName;
    private String index;
    private Long curr;
    private Long size;
    private String menuId;
    private String company;

    /**
     * 用户信息
     */
    private UserInfo userInfo;

    public void setPage(Page page) {
        page.setCurrent(this.curr);
        page.setSize(this.size);
    }

    public boolean isAll(String str) {
        return StringUtils.isNotBlank(str) && ("99".equals(str) || "全部".equals(str));
    }

}
