|
@@ -1,12 +1,12 @@
|
|
|
package org.jeecg.common.api.vo;
|
|
|
|
|
|
-import java.io.Serializable;
|
|
|
-
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
|
import io.swagger.annotations.ApiModel;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
-import org.jeecg.common.constant.CommonConstant;
|
|
|
import lombok.Data;
|
|
|
+import org.jeecg.common.constant.CommonConstant;
|
|
|
+
|
|
|
+import java.io.Serializable;
|
|
|
|
|
|
/**
|
|
|
* 接口返回数据格式
|
|
@@ -112,6 +112,15 @@ public class Result<T> implements Serializable {
|
|
|
r.setResult(data);
|
|
|
return r;
|
|
|
}
|
|
|
+
|
|
|
+ public static Result<Object> successMsg(String msg,Object data) {
|
|
|
+ Result<Object> r = new Result<Object>();
|
|
|
+ r.setSuccess(true);
|
|
|
+ r.setCode(CommonConstant.SC_OK_200);
|
|
|
+ r.setResult(data);
|
|
|
+ return r;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
public static Result<Object> error(String msg) {
|
|
|
return error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, msg);
|