|
|
@@ -1,9 +1,11 @@
|
|
|
package com.github.microservice.models.hxz.base;
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
+import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
@@ -24,6 +26,9 @@ public class HxzBaseResult implements Serializable {
|
|
|
// 错误消息(Status为0时屏幕显示此内容,最多不超过8个汉字)
|
|
|
private String Msg = "";
|
|
|
|
|
|
+ @Schema(description = "错误信息")
|
|
|
+ private String message = "";
|
|
|
+
|
|
|
public boolean isSuccess() {
|
|
|
return Status == 1;
|
|
|
}
|
|
|
@@ -33,14 +38,22 @@ public class HxzBaseResult implements Serializable {
|
|
|
Status = 0;
|
|
|
this.Msg = msg;
|
|
|
}
|
|
|
+
|
|
|
// 设置成功
|
|
|
public void setSuccess(String msg) {
|
|
|
Status = 1;
|
|
|
this.Msg = msg;
|
|
|
}
|
|
|
+
|
|
|
// 设置成功
|
|
|
public void setSuccess() {
|
|
|
Status = 1;
|
|
|
}
|
|
|
|
|
|
+ public String getMsg() {
|
|
|
+ if (StringUtils.isNotEmpty(this.message)) {
|
|
|
+ return this.message;
|
|
|
+ }
|
|
|
+ return Msg;
|
|
|
+ }
|
|
|
}
|