| | |
| | | |
| | | public static RequestConfig config = RequestConfig.custom().setConnectTimeout(5000).setSocketTimeout(5000).build(); |
| | | // 配置您申请的KEY,在个人中心->我的数据,接口名称上方查看 |
| | | public static final String APPKEY = ""; |
| | | public static final String APPKEY = "61ad64e1ea78a24e00c449c346caa5d7"; |
| | | //明文查询地址 |
| | | public static String query_url = "http://op.juhe.cn/idcard/query?key=" + APPKEY; |
| | | |
| | |
| | | public void authentificationMembe(MemberDTO memberDTO) { |
| | | Member member= this.getById(memberDTO.getMemberid()); |
| | | member.setPhone(memberDTO.getPhone()); |
| | | if(memberDTO.getIdNumber()==null){ |
| | | throw new ServiceException("身份证号不能为空"); |
| | | } |
| | | if(memberDTO.getRealName()==null){ |
| | | throw new ServiceException("姓名不能为空"); |
| | | } |
| | | member.setIdNumber(memberDTO.getIdNumber()); |
| | | member.setRealName(memberDTO.getRealName()); |
| | | String realname = "";// 姓名 |
| | |
| | | } |
| | | } |
| | | JSONObject jsonObject= JSON.parseObject(result); |
| | | String object1= jsonObject.get("reason").toString(); |
| | | if(!object1.equals("成功")){ |
| | | throw new ServiceException(object1); |
| | | } |
| | | |
| | | |
| | | String object= jsonObject.get("result").toString(); |
| | | JSONObject jsonObject1= JSON.parseObject(object); |
| | | if (Integer.valueOf(jsonObject1.get("res").toString())==2){ |