package com.ruoyi.erp.request;

import com.alibaba.fastjson2.JSONObject;

/**
 * 授权列表查询请求（示例类）
 */
public class AuthorizeListQueryRequest extends ERPRequestBase {
    public AuthorizeListQueryRequest(IERPAccount erpAccount) {
        super("https://open.goofish.pro/api/open/user/authorize/list", erpAccount);
    }

    /**
     * 设置分页参数
     * @param pageNum 页码
     * @param pageSize 每页数量
     */
    public void setPagination(int pageNum, int pageSize) {
        JSONObject params = new JSONObject();
        params.put("page_num", pageNum);
        params.put("page_size", pageSize);
        this.requestBody = params;
    }

    /**
     * 设置过滤条件
     * @param status 授权状态
     */
    public void setFilter(String status) {
        if (requestBody == null) {
            requestBody = new JSONObject();
        }
        requestBody.put("status", status);
    }
}
