zainali5120
2020-09-20 3ffaa6bf323862a3770897d4e934baf98d324c47
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.xcong.excoin.utils.api.response;
 
 
import com.xcong.excoin.utils.api.ApiException;
 
public class ApiResponse<T> {
 
    public String status;
    public String errCode;
    public String errMsg;
    public T data;
 
    public T checkAndReturn() {
        if ("ok".equals(status)) {
            return data;
        }
        throw new ApiException(errCode, errMsg);
    }
}