| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-04-18 16:17 |
| | | **/ |
| | | |
| | | public class ResponseBean implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | public static final String SUCCESS = "200"; |
| | | /** |
| | | * 1-鉴权 2-发送消息 3-新消息提醒 |
| | | */ |
| | | private Integer type; |
| | | |
| | | private String status; |
| | | private Integer status; |
| | | |
| | | private String type; |
| | | private Object data; |
| | | |
| | | private String info; |
| | | |
| | | private String channelId; |
| | | |
| | | private Map<Object, Object> mapInfo = new HashMap<>(); |
| | | |
| | | private List<?> row; |
| | | |
| | | public static ResponseBean ok(String type, String info) { |
| | | ResponseBean responseBean = new ResponseBean(); |
| | | responseBean.status = SUCCESS; |
| | | responseBean.type = type; |
| | | responseBean.info = info; |
| | | return responseBean; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getType() { |
| | | public Integer getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | public void setType(Integer type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getInfo() { |
| | | return info; |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setInfo(String info) { |
| | | this.info = info; |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getChannelId() { |
| | | return channelId; |
| | | public Object getData() { |
| | | return data; |
| | | } |
| | | |
| | | public void setChannelId(String channelId) { |
| | | this.channelId = channelId; |
| | | public void setData(Object data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | public Map<Object, Object> getMapInfo() { |
| | | return mapInfo; |
| | | public static ResponseBean fail(){ |
| | | ResponseBean res = new ResponseBean(); |
| | | res.setStatus(0); |
| | | return res; |
| | | } |
| | | |
| | | public void setMapInfo(Map<Object, Object> mapInfo) { |
| | | this.mapInfo = mapInfo; |
| | | } |
| | | |
| | | public void putInfo(Object key, Object value) { |
| | | this.mapInfo.put(key, value); |
| | | } |
| | | |
| | | public List<?> getRow() { |
| | | return row; |
| | | } |
| | | |
| | | public void setRow(List<?> row) { |
| | | this.row = row; |
| | | public static ResponseBean ok(Object data) { |
| | | ResponseBean res = new ResponseBean(); |
| | | res.setStatus(1); |
| | | res.setData(data); |
| | | return res; |
| | | } |
| | | } |