|
@@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|
|
+import io.swagger.annotations.ApiModelProperty;
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
import java.util.Calendar;
|
|
@@ -16,20 +17,22 @@ public class R implements Serializable {
|
|
|
|
|
|
private static final long serialVersionUID = 2719931935414658118L;
|
|
|
|
|
|
+ @ApiModelProperty(value = "处理状态:2000: 成功, 其他数字: 失败", name = "status")
|
|
|
private final Integer status;
|
|
|
|
|
|
+ @ApiModelProperty(value = "消息", name = "message")
|
|
|
private final String message;
|
|
|
|
|
|
-// @JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
|
|
|
-// @JsonInclude(value = Include.NON_NULL)
|
|
|
|
|
|
+ @ApiModelProperty(value = "返回数据", name = "data")
|
|
|
private final Object data;
|
|
|
|
|
|
+ @ApiModelProperty(value = "异常信息", name = "exceptions")
|
|
|
@JsonInclude(value = Include.NON_EMPTY)
|
|
|
-// @JsonInclude(value = Include.NON_NULL)
|
|
|
@JSONField(serialize = false)
|
|
|
private final String[] exceptions;
|
|
|
|
|
|
+ @ApiModelProperty(value = "返回时间", name = "timestamp")
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
|
|
private final Date timestamp;
|
|
|
|
|
@@ -142,7 +145,7 @@ public class R implements Serializable {
|
|
|
|
|
|
public Date addTime(){
|
|
|
Calendar nowTime= Calendar.getInstance();
|
|
|
- nowTime.add(Calendar.MINUTE,15);
|
|
|
+// nowTime.add(Calendar.MINUTE,15);
|
|
|
Date time = nowTime.getTime();
|
|
|
return time;
|
|
|
}
|