BaseRequest.java
1.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package com.crossoverjie.cim.common.req;
import io.swagger.annotations.ApiModelProperty;
/**
* Function:
* @author crossoverJie
* Date: 2017/6/7 下午11:28
* @since JDK 1.8
*/
public class BaseRequest {
@ApiModelProperty(required=false, value="唯一请求号", example = "1234567890")
private String reqNo;
@ApiModelProperty(required=false, value="当前请求的时间戳", example = "0")
private int timeStamp;
public BaseRequest() {
this.setTimeStamp((int)(System.currentTimeMillis() / 1000));
}
public String getReqNo() {
return reqNo;
}
public void setReqNo(String reqNo) {
this.reqNo = reqNo;
}
public int getTimeStamp() {
return timeStamp;
}
public void setTimeStamp(int timeStamp) {
this.timeStamp = timeStamp;
}
@Override
public String toString() {
return "BaseRequest{" +
"reqNo='" + reqNo + '\'' +
", timeStamp=" + timeStamp +
'}';
}
}