首页>代码>springboot+mybatis-plus框架实现java web项目公共图片上传接口(图片服务器)>/imgserver/src/main/java/com/npf/imgserver/common/base/ResultBase.java
package com.npf.imgserver.common.base; import com.npf.imgserver.common.enums.ResultCodeEnum; import java.io.Serializable; /** * Created with IDEA * author: NiPengFei * Date:18/9/22 * Time:下午10:52 */ public class ResultBase<T> implements Serializable { public ResultBase(ResultCodeEnum codeEnum) { this.codeEnum = codeEnum; } public ResultBase(ResultCodeEnum codeEnum, T data) { this.codeEnum = codeEnum; this.data = data; } /** * 返回code+msg */ private ResultCodeEnum codeEnum; /** * 返回数据 */ private T data; public String getCode() { return codeEnum.getCode(); } public String getMessage() { return codeEnum.getMessage(); } public T getData() { return data; } public void setData(T data) { this.data = data; } public void setCodeEnum(ResultCodeEnum codeEnum) { this.codeEnum = codeEnum; } }
最近下载更多