首页>代码>HTML5 录制视频 + 上传>/HTML5Video/src/main/java/com/demo/util/Result.java
package com.demo.util;

import java.io.Serializable;
import java.util.Map;



public class Result implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 数据
	 */
	Map<String, Object> data;
	
	/**
	 * 代码
	 */
	int code;
	
	/**
	 * 消息
	 */
	String message;
	
	/**
	 * 时间戳
	 */
	String timestamp;
	
	public static Result success(){
		Result result = new Result();
		result.setCode(0);
		return result;
	}
	
	public static Result success(Map<String, Object> obj){
		Result result = new Result();
		result.setCode(0);
		result.setData(obj);
		return result;
	}

	public Result() {
		
	}

	public Result(int code) {
		this.code = code;
		this.timestamp = DateUtil.getCurrentTime();
	}

	public Result(int code, String message) {
		this.code = code;
		this.message = message;
		this.timestamp = DateUtil.getCurrentTime();
	}

	public Result(int code, Map<String, Object> data) {
		this.code = code;
		this.data = data;
		this.timestamp = DateUtil.getCurrentTime();
	}

	public Result(int code, String message, Map<String, Object> data) {
		this.code = code;
		this.message = message;
		this.data = data;
		this.timestamp = DateUtil.getCurrentTime();
	}

	public Map<String, Object> getData() {
		return data;
	}

	public void setData(Map<String, Object> data) {
		this.data = data;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(String timestamp) {
		this.timestamp = timestamp;
	}
}
最近下载更多
sjc199  LV2 2022年6月13日
13613768985  LV1 2022年5月13日
han329574  LV8 2021年12月5日
空空空  LV1 2021年7月20日
871505903  LV4 2021年4月26日
lktkitty  LV1 2020年12月7日
a770919458  LV1 2020年10月29日
无聊de人  LV1 2020年7月27日
yantingbin2012  LV1 2020年7月13日
liumingliang  LV1 2020年7月11日
最近浏览更多
15103432984  LV2 3月16日
3334004690  LV3 3月6日
pangzhihui  LV12 2023年12月15日
uni-code_0123  LV1 2023年11月29日
微信网友_6696101153525760 2023年10月17日
暂无贡献等级
fesfefe  LV13 2023年9月21日
yangxb2  LV10 2023年9月12日
微信网友_6600229376544768  LV1 2023年8月10日
dongzhan  LV12 2023年6月30日
wwswdgyqd  LV6 2023年5月25日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友