zainali5120
2020-10-28 8fda5eddb56178a0c1e0e247b5c7f45ffc739c92
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);
    }
}