|
|
@@ -8,6 +8,8 @@ import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.poi.ss.formula.functions.T;
|
|
|
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.time.ZoneOffset;
|
|
|
import java.util.List;
|
|
|
|
|
|
@Data
|
|
|
@@ -18,6 +20,8 @@ public class Result<T> {
|
|
|
private int code;
|
|
|
//提示信息
|
|
|
private String msg;
|
|
|
+ //当前时候毫秒值
|
|
|
+ private String time;
|
|
|
// 返回对象
|
|
|
private List<T> data;
|
|
|
|
|
|
@@ -60,17 +64,12 @@ public class Result<T> {
|
|
|
this.msg = sysCode.getMsg();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- public Result(int code, String msg) {
|
|
|
- this(code, msg, null);
|
|
|
- }
|
|
|
-
|
|
|
public void setSystemCode(SystemCode sysCode) {
|
|
|
this.code = sysCode.getCode();
|
|
|
this.msg = sysCode.getMsg();
|
|
|
}
|
|
|
|
|
|
public Result<T> success(List<T> data){
|
|
|
- return new Result<>(SystemCode.SUCCESS.getCode(), SystemCode.SUCCESS.getMsg(),data);
|
|
|
+ return new Result<T>(SystemCode.SUCCESS.getCode(), SystemCode.SUCCESS.getMsg(),String.valueOf(LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8"))),data);
|
|
|
}
|
|
|
}
|