fix 标签管理提示语
This commit is contained in:
@@ -3,6 +3,7 @@ package com.jero.common.api.vo;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.jero.common.util.MessageUtils;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
@@ -66,11 +67,21 @@ public class Result<T> implements Serializable {
|
||||
return r;
|
||||
}
|
||||
|
||||
public static<T> Result<T> OK(String message) {
|
||||
public static<T> Result<T> OK(String msg) {
|
||||
Result<T> r = new Result<>();
|
||||
r.setSuccess(true);
|
||||
r.setCode(CommonConstant.SC_OK_200);
|
||||
r.setMessage(message);
|
||||
msg = MessageUtils.getMessage(msg);
|
||||
r.setMessage(msg);
|
||||
return r;
|
||||
}
|
||||
|
||||
public static<T> Result<T> OK(String msg, Object... args) {
|
||||
Result<T> r = new Result<>();
|
||||
r.setSuccess(true);
|
||||
r.setCode(CommonConstant.SC_OK_200);
|
||||
msg = MessageUtils.getMessage(msg,args);
|
||||
r.setMessage(msg);
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -101,6 +112,12 @@ public class Result<T> implements Serializable {
|
||||
}
|
||||
|
||||
public static<T> Result<T> error(String msg) {
|
||||
msg = MessageUtils.getMessage(msg);
|
||||
return error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, msg);
|
||||
}
|
||||
|
||||
public static<T> Result<T> error(String msg, Object... args) {
|
||||
msg = MessageUtils.getMessage(msg,args);
|
||||
return error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, msg);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user