From 2fa4497eeb7a56eb24c901603b702171d4a1c43b Mon Sep 17 00:00:00 2001 From: zhangqinbin <181961702@qq.com> Date: Fri, 9 Apr 2021 09:15:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=88=B3=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/ebtp/extend/timeService/TimeServiceConstant.java | 3 ++- .../mall/ebtp/extend/timeService/tsa/SystemTime.java | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/TimeServiceConstant.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/TimeServiceConstant.java index bfd086d..d88c289 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/TimeServiceConstant.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/TimeServiceConstant.java @@ -156,7 +156,8 @@ public class TimeServiceConstant { .setDate(date.getDate()) .setHour(date.getHours()) .setMinute(date.getMinutes()) - .setSecond(date.getSeconds()); + .setSecond(date.getSeconds()) + .setTimestamp(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date)); return systemTime; }catch (Exception e){ log.error("获取时间戳异常", e); diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/SystemTime.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/SystemTime.java index 8915664..1683127 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/SystemTime.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/SystemTime.java @@ -11,8 +11,10 @@ import lombok.experimental.Accessors; @Data @Accessors(chain = true) public class SystemTime { - - + /** + * 时间 + */ + private String timestamp; /** * 年 */