package com.lanyuanxiaoyao.service.web.controller.base;

/**
 * Crud 响应
 *
 * @author lanyuanxiaoyao
 * @date 2023-07-06
 */
public class AmisCrudResponse extends AmisMapResponse {
    public void setData(Iterable<?> list) {
        getData().put("items", list);
    }

    public void setTotal(Long total) {
        getData().put("total", total);
    }

    public void setTotal(Integer total) {
        setTotal(total.longValue());
    }

    public void setData(Iterable<?> list, Long total) {
        setData(list);
        setTotal(total);
    }

    public void setData(Iterable<?> list, Integer total) {
        setData(list, total.longValue());
    }
}
