| @@ -200,13 +200,13 @@ public class HaiKangWeiShiUtil { | |||||
| throw new MallinkException(errStatus,"haikang getFee error.["+result.getString("error")+"]"+result.getString("message")); | throw new MallinkException(errStatus,"haikang getFee error.["+result.getString("error")+"]"+result.getString("message")); | ||||
| } | } | ||||
| if (!result.getString("code").equals("200") ) { | |||||
| if (!result.getString("code").equals("0") ) { | |||||
| String message = result.getString("msg"); | String message = result.getString("msg"); | ||||
| throw new MallinkException(result.getInteger("code"), "haikang getFee error."+message); | |||||
| throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(), "haikang getFee error.["+result.getString("code")+"]"+message); | |||||
| } | } | ||||
| JSONObject attribute = result.getJSONObject("data"); | JSONObject attribute = result.getJSONObject("data"); | ||||
| if (null == attribute) { | if (null == attribute) { | ||||
| throw new MallinkException(result.getInteger("code"), "haikang getFee error. no result"+carNumber); | |||||
| throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(), "haikang getFee error. no result ["+result.getInteger("code")+"]"+carNumber); | |||||
| } | } | ||||
| return attribute; | return attribute; | ||||
| } | } | ||||
| @@ -317,10 +317,10 @@ public class HaiKangWeiShiUtil { | |||||
| if (null != pairs) { | if (null != pairs) { | ||||
| try { | try { | ||||
| StringEntity entity = new StringEntity(JSON.toJSONString(pairs)); | |||||
| StringEntity entity = new StringEntity(JSON.toJSONString(pairs),"UTF-8"); | |||||
| entity.setContentType("application/json"); | entity.setContentType("application/json"); | ||||
| httpPost.setEntity(entity); | httpPost.setEntity(entity); | ||||
| } catch (UnsupportedEncodingException e) { | |||||
| } catch (Exception e) { | |||||
| log.error(e.getLocalizedMessage(),e); | log.error(e.getLocalizedMessage(),e); | ||||
| } | } | ||||
| } | } | ||||