| | |
| | | super(); |
| | | } |
| | | |
| | | public ApiV1Resp(String respCode, String respMsg, T data, ApiV1Req<JSONObject> req) { |
| | | public ApiV1Resp(String respCode, String respMsg, T data, ApiV1Req<Object> req) { |
| | | this.data = data; |
| | | this.sn = req.getSn(); |
| | | this.auth = req.getAuth(); |
| | |
| | | this.respMsg = respMsg; |
| | | } |
| | | |
| | | public static ApiV1Resp<Object> success(Object data, ApiV1Req<JSONObject> req) { |
| | | public static ApiV1Resp<Object> success(Object data, ApiV1Req<Object> req) { |
| | | return new ApiV1Resp<>(CODE_SUCCESS, null, data, req); |
| | | } |
| | | |
| | | public static ApiV1Resp<Object> error(String respMsg, ApiV1Req<JSONObject> req) { |
| | | public static ApiV1Resp<Object> error(String respMsg, ApiV1Req<Object> req) { |
| | | return new ApiV1Resp<>(CODE_ERROR, respMsg, null, req); |
| | | } |
| | | |