| | |
| | | } else{ |
| | | response = JSONUtil.parseObj(responseJson); |
| | | } |
| | | if (response.getStr(apiConfig.getResultCodeKey()).equals("0")) { |
| | | if (response.getStr(apiConfig.getResultCodeKey()).equals("1")) { |
| | | AjaxResult ajaxResult = AjaxResult.success(); |
| | | if (response.getStr(apiConfig.getResultDataKey()) != null && StrUtil.isNotBlank(response.getStr(apiConfig.getResultDataKey()))){ |
| | | JSONArray resultData = response.getJSONArray(apiConfig.getResultDataKey()); |
| | | List<Map<String, String>> list = new ArrayList<>(); |
| | | for (Object resultDatum : resultData) { |
| | |
| | | list.add(map); |
| | | } |
| | | ajaxResult.put("data", list); |
| | | }else { |
| | | ajaxResult.put("data",response); |
| | | } |
| | | return ajaxResult; |
| | | } else { |
| | | return AjaxResult.error().put("result", JSONUtil.parseObj(responseJson)); |