MCPcopy Create free account
hub / github.com/Exrick/xpay / Result

Class Result

xpay-code/src/main/java/cn/exrick/bean/dto/Result.java:11–77  ·  view source on GitHub ↗

前后端交互数据标准 @author Exrick @date 2017/8/20

Source from the content-addressed store, hash-verified

9 * @date 2017/8/20
10 */
11public class Result<T> implements Serializable{
12
13 /**
14 * 成功标志
15 */
16 private boolean success;
17
18 /**
19 * 失败消息
20 */
21 private String message;
22
23 /**
24 * 返回代码
25 */
26 private Integer code;
27
28 /**
29 * 时间戳
30 */
31 private long timestamp = System.currentTimeMillis();
32
33 /**
34 * 结果对象
35 */
36 private T result;
37
38 public boolean isSuccess() {
39 return success;
40 }
41
42 public void setSuccess(boolean success) {
43 this.success = success;
44 }
45
46 public String getMessage() {
47 return message;
48 }
49
50 public void setMessage(String message) {
51 this.message = message;
52 }
53
54 public Integer getCode() {
55 return code;
56 }
57
58 public void setCode(Integer code) {
59 this.code = code;
60 }
61
62 public long getTimestamp() {
63 return timestamp;
64 }
65
66 public void setTimestamp(long timestamp) {
67 this.timestamp = timestamp;
68 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected