Commit 045b25508dd245fe5e0f30de4438e30dbcfb1632

Authored by baohanddd
1 parent 5c6ec59c98

all api back now time

Showing 2 changed files with 10 additions and 0 deletions

platform-common/src/main/java/com/lyms/platform/common/result/BaseResponse.java View file @ 045b255
1 1 package com.lyms.platform.common.result;
2 2  
3 3  
  4 +import com.lyms.platform.common.utils.DateUtil;
  5 +
4 6 /**
5 7 * 基础的返回模型
6 8 *
... ... @@ -16,6 +18,10 @@
16 18  
17 19 protected String errormsg;
18 20 protected int errorcode;
  21 +
  22 + public String getNow() {
  23 + return DateUtil.getymd();
  24 + }
19 25  
20 26 public BaseResponse() {
21 27 super();
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java View file @ 045b255
... ... @@ -20,6 +20,10 @@
20 20 public static final int DAY_SECONDS = 86399;
21 21 public static final int DAY_FULL_SECONDS = 86400;
22 22  
  23 + public static String getymd() {
  24 + return y_m_d.format(new Date());
  25 + }
  26 +
23 27 public static String getymdhmss() {
24 28 return yyyyMMddHHmmssSSS.format(new Date());
25 29 }