All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zcj.web.dto.ListObj Maven / Gradle / Ivy

package com.zcj.web.dto;

import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;

// 用于把列表封装一层放到对象里
public class ListObj implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "列表数据")
    private List items;

    @ApiModelProperty(value = "数据总量", example = "0")
    private Integer total;

    public static  ListObj init(List list) {
        ListObj result = new ListObj();
        result.setItems(list);
        return result;
    }

    public static  ListObj init(List list, Integer total) {
        ListObj result = new ListObj();
        result.setItems(list);
        result.setTotal(total);
        return result;
    }

    public List getItems() {
        return items;
    }

    public void setItems(List items) {
        this.items = items;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy