Commit 86bc8159 by tyfanchz

增加时间格式化注解

1 parent b1e1475b
......@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.model;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* <p>Description:
......@@ -53,11 +54,13 @@ public class PlatformAd implements Serializable {
/**
* 创建时间 添加时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**
......@@ -192,4 +195,4 @@ public class PlatformAd implements Serializable {
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
}
......@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.model;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* <p>Description:
......@@ -53,11 +54,13 @@ public class PlatformApi implements Serializable {
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**
......@@ -192,4 +195,4 @@ public class PlatformApi implements Serializable {
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
}
......@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.model;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* <p>Description:
......@@ -48,6 +49,7 @@ public class PlatformApiCall implements Serializable {
/**
* 创建时间 访问时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
......@@ -146,4 +148,4 @@ public class PlatformApiCall implements Serializable {
", remark='" + remark + '\'' +
'}';
}
}
\ No newline at end of file
}
......@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.model;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* <p>Description:
......@@ -28,6 +29,7 @@ public class PlatformAppDownload implements Serializable {
/**
* 创建时间 下载时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
......@@ -94,4 +96,4 @@ public class PlatformAppDownload implements Serializable {
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
}
......@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.model;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* <p>Description:
......@@ -88,11 +89,13 @@ public class PlatformCustomer implements Serializable {
/**
* 创建d时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**
......@@ -286,4 +289,4 @@ public class PlatformCustomer implements Serializable {
", remark='" + remark + '\'' +
'}';
}
}
\ No newline at end of file
}
......@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.model;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* <p>Description:
......@@ -43,6 +44,7 @@ public class PlatformDevice implements Serializable {
/**
* 激活时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date activatTime;
/**
......@@ -53,11 +55,13 @@ public class PlatformDevice implements Serializable {
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**
......@@ -188,4 +192,4 @@ public class PlatformDevice implements Serializable {
", remark='" + remark + '\'' +
'}';
}
}
\ No newline at end of file
}
......@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.model;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* <p>Description:
......@@ -58,6 +59,7 @@ public class PlatformUser implements Serializable {
/**
* 最后登录时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date lastLoginTime;
/**
......@@ -68,11 +70,13 @@ public class PlatformUser implements Serializable {
/**
* 创建时间 注册时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**
......@@ -230,4 +234,4 @@ public class PlatformUser implements Serializable {
", remark='" + remark + '\'' +
'}';
}
}
\ No newline at end of file
}
......@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.vo;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* <p>Description:
......@@ -18,11 +19,13 @@ public class ApiCallVo implements Serializable {
/**
* 访问开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date accessStartTime;
/**
* 访问结束时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date accessEndTime;
public Date getAccessStartTime() {
......
......@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.vo;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* <p>Description:
......@@ -28,11 +29,13 @@ public class DeviceVo implements Serializable {
/**
* 激活开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date activatStartTime;
/**
* 激活开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date activatEndTime;
public String getCustomerName() {
......
package cn.com.glsx.openplatform.vo;
import java.util.List;
public class Pagination<T> {
private long total;
private List<T> list;
public Pagination(long total, List<T> list) {
this.total = total;
this.list = list;
}
public long getTotal() {
return total;
}
public void setTotal(long total) {
this.total = total;
}
public List<T> getList() {
return list;
}
public void setList(List<T> list) {
this.list = list;
}
@Override
public String toString() {
return "Pagination{" +
"total=" + total +
", list=" + list +
'}';
}
}
......@@ -9,21 +9,16 @@ import cn.com.glsx.openplatform.enums.ResultCodeEnum;
* 返回数据
*/
public class R extends HashMap<String, Object> {
private static final long serialVersionUID = 1L;
public final static String CODE_KEY = "code";
public final static String MSG_KEY = "message";
private final static String CODE_KEY = "code";
private final static String MSG_KEY = "message";
private final static String DATA_KEY = "data";
private final static String LIST_KEY = "list";
private final static String PAGE_KEY = "page";
private final static String TOTAL_PAGES_KEY = "totalPages";
private final static String TOTAL_ELEMENTS_KEY = "totalElements";
private final static int SUCCESS_CODE = ResultCodeEnum.SUCCESS.getCode();
private final static String SUCCESS_MESSAGE = ResultCodeEnum.SUCCESS.getMsg();
public R() {
private R() {
put(CODE_KEY, SUCCESS_CODE);
put(MSG_KEY, SUCCESS_MESSAGE);
}
......
......@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.vo;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* <p>Description:
......@@ -32,11 +33,13 @@ public class UserVo implements Serializable {
/**
* 激活开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date registerStartTime;
/**
* 激活开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date registerEndTime;
public String getCustomerName() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!