| | |
| | | return authTokenDTO; |
| | | } |
| | | |
| | | public CommonResult<JSONObject> handleHttp(String method, String url, Map<String, Object> params) { |
| | | JSONObject data = new JSONObject(); |
| | | public CommonResult<Object> handleHttp(String method, String url, Map<String, Object> params) { |
| | | Object data = new Object(); |
| | | String resp = null; |
| | | try { |
| | | String upperMethod = method.toUpperCase(); |
| | |
| | | if (!GlobalErrorCodeConstants.SUCCESS.getCode().equals(respCode)) { |
| | | CommonResult.error(respCode, jsonObject.getString(RESP_MSG)); |
| | | } |
| | | data = jsonObject.getJSONObject(RESP_DATA); |
| | | data = jsonObject.get(RESP_DATA); |
| | | } catch (Exception ex) { |
| | | ex.printStackTrace(); |
| | | return CommonResult.error(GlobalErrorCodeConstants.UNKNOWN.getCode(), ex.getMessage()); |